<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <!--

        Licensed to the Apache Software Foundation (ASF) under one or more
        contributor license agreements.  See the NOTICE file distributed with
        this work for additional information regarding copyright ownership.
        The ASF licenses this file to You under the Apache License, Version 2.0
        (the "License"); you may not use this file except in compliance with
        the License.  You may obtain a copy of the License at

           http://www.apache.org/licenses/LICENSE-2.0

        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an "AS IS" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.
    -->

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.cxf.karaf</groupId>
        <artifactId>karaf-parent</artifactId>
        <version>2.3.4</version>
    </parent>

    <groupId>org.apache.cxf.karaf</groupId>
    <artifactId>apache-cxf</artifactId>
    <packaging>pom</packaging>
    <name>CXF :: Apache Karaf :: Features</name>

    <!-- some of the bundles is located at: http://repo1.maven.org/maven2/org/apache/servicemix/bundles/ -->
    <properties>
      <abdera-bundle-version>0.4.0-incubating_3</abdera-bundle-version>
      <ant-bundle-version>1.7.0_3</ant-bundle-version>
      <antlr-bundle-version>2.7.7_2</antlr-bundle-version>
      <aopalliance-bundle-version>1.0_3</aopalliance-bundle-version>
      <asm-bundle-version>2.2.3_3</asm-bundle-version>
      <bcel-bundle-version>5.2_2</bcel-bundle-version>
      <cglib-version>2.1_3_6</cglib-version>
      <commons-beanutils-bundle-version>1.7.0_3</commons-beanutils-bundle-version>
      <commons-csv-version>1.0-r706899_3</commons-csv-version>
      <commons-codec-version>1.4</commons-codec-version>
      <commons-collections-version>3.2.1</commons-collections-version>
      <commons-io-bundle-version>1.3.2_3</commons-io-bundle-version>
      <commons-jxpath-version>1.3</commons-jxpath-version>
      <commons-lang-version>2.4</commons-lang-version>
      <commons-net-version>2.0</commons-net-version>
      <commons-management-version>1.0</commons-management-version>
      <commons-pool-bundle-version>1.5.4_1</commons-pool-bundle-version>
      <dom4j-bundle-version>1.6.1_2</dom4j-bundle-version>
      <el-api-1.0-version>1.0.1</el-api-1.0-version>
      <fastinfoset-version>1.2.7_2</fastinfoset-version>
      <features.file>features.xml</features.file>
      <felix.configadmin.version>1.2.4</felix.configadmin.version>
      <felix.framework.version>2.0.5</felix.framework.version>
      <geronimo-el-version>1.0.1</geronimo-el-version>
      <geronimo-jsp-version>1.0.1</geronimo-jsp-version>
      <geronimo-ws-metadata-spec-version>1.1.2</geronimo-ws-metadata-spec-version>
      <gernimo-annotation-spec-version>1.1.1</gernimo-annotation-spec-version>
      <geronimo-jms-spec-version>1.1.1</geronimo-jms-spec-version>
      <javax-mail-version>1.4.3</javax-mail-version>
      <jdom-bundle-version>1.1_2</jdom-bundle-version>
      <jettison-bundle-version>1.2</jettison-bundle-version>
      <jaxb-bundle-version>2.2.1.1_1</jaxb-bundle-version>
      <neethi-bundle-version>2.0.4_2</neethi-bundle-version>
      <opensaml-version>1.1_3</opensaml-version>
      <oro-bundle-version>2.0.8_3</oro-bundle-version>
      <oscache-bundle-version>2.4_3</oscache-bundle-version>
      <osgi.compendium.version>4.2.0</osgi.compendium.version>
      <pax.web.version>0.7.2</pax.web.version>
      <pax-logging-version>1.6.0</pax-logging-version>
      <quartz-bundle-version>1.8.3_2</quartz-bundle-version>
      <jaxws.api.version>2.2</jaxws.api.version>
      <servlet-api-2.5-version>1.1.2</servlet-api-2.5-version>
      <servicemix-specs-version>1.7.0</servicemix-specs-version>
      <velocity-bundle-version>1.7_1</velocity-bundle-version>
      <xalan-bundle-version>2.7.1_2</xalan-bundle-version>
      <xerces-bundle-version>2.9.1_3</xerces-bundle-version>
      <xmlbeans-bundle-version>2.5.0_1</xmlbeans-bundle-version>
      <xmlschema-version>1.4.5</xmlschema-version>
      <xmlsec-bundle-version>1.4.4_1</xmlsec-bundle-version>
      <xmlresolver-bundle-version>1.2_2</xmlresolver-bundle-version>
      <xstream-bundle-version>1.3_3</xstream-bundle-version>
      <woodstox-core-bundle-version>4.0.8</woodstox-core-bundle-version>
      <stax2-api-bundle-version>3.0.1</stax2-api-bundle-version>
      <saaj-impl-version>1.3.2_1</saaj-impl-version>
      <wsdl4j-bundle-version>1.6.2_2</wsdl4j-bundle-version>
      <wss4j-version>1.5.11</wss4j-version>
    </properties>
    
    <!-- The validate plugin will export these provided dependencies bundles' export packages first -->  
    <dependencies>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>4.2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.logging</groupId>
            <artifactId>pax-logging-api</artifactId>
            <version>${pax-logging-version}</version>
            <scope>provided</scope>
        </dependency>        
        <dependency>
            <groupId>org.ops4j.pax.logging</groupId>
            <artifactId>pax-logging-service</artifactId>
            <version>${pax-logging-version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <version>${felix.framework.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.configadmin</artifactId>
            <version>${felix.configadmin.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
      <resources>
        <resource>
          <directory>src/main/resources</directory>
          <filtering>true</filtering>
        </resource>
      </resources>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <executions>
             <execution>
                <id>filter</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>resources</goal>
                </goals>
             </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-artifacts</id>
                <phase>package</phase>
                <goals>
                  <goal>attach-artifact</goal>
                </goals>
                <configuration>
                  <artifacts>
                    <artifact>
                      <file>target/classes/features.xml</file>
                       <type>xml</type>
                       <classifier>features</classifier>
                     </artifact>
                   </artifacts>
                 </configuration>
               </execution>
           </executions>
         </plugin>
      </plugins>
    </build>

    <profiles>
       <profile>
          <id>validate</id>
          <build>
             <plugins>
                <plugin>
                   <groupId>org.apache.karaf.tooling</groupId>
                   <artifactId>features-maven-plugin</artifactId>
                   <version>${karaf-version}</version>
                   <configuration>
                       <file>${project.build.directory}/classes/${features.file}</file>
                       <karafConfig>${project.build.directory}/classes/config.properties</karafConfig>
                   </configuration>
                   <executions>
                     <execution>
                       <id>validate</id>
                       <phase>process-resources</phase>
                       <goals>
                         <goal>validate</goal>
                       </goals>
                     </execution>
                   </executions>
                   <dependencies>
                    <dependency>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-simple</artifactId>
                     <version>1.4.3</version>
                </dependency>
                 </dependencies>
               </plugin>
              </plugins>
           </build>
        </profile>
     </profiles>

</project>
