<?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.camel</groupId>
        <artifactId>karaf</artifactId>
        <version>2.9.0.fuse-7-061</version>
        <relativePath>..</relativePath>
    </parent>

    <groupId>org.apache.camel.karaf</groupId>
    <artifactId>apache-camel</artifactId>
    <packaging>pom</packaging>
    <name>Camel :: Platforms :: Apache Karaf :: Features</name>

    <!-- some of the bundles is located at: http://repo1.maven.org/maven2/org/apache/servicemix/bundles/ -->
    <properties>
      <ant-bundle-version>1.7.0_6</ant-bundle-version>
      <antlr-bundle-version>2.7.7_5</antlr-bundle-version>
      <aopalliance-bundle-version>1.0_6</aopalliance-bundle-version>
      <asm2-bundle-version>2.2.3_5</asm2-bundle-version>
      <aws-java-sdk-bundle-version>1.2.12_1</aws-java-sdk-bundle-version>
      <bcel-bundle-version>5.2_4</bcel-bundle-version>
      <bcpg-jdk16-bundle-version>1.46_2</bcpg-jdk16-bundle-version>
      <cglib-version>2.1_3_7</cglib-version>
      <cometd-java-server-bundle-version>2.3.1_2</cometd-java-server-bundle-version>
      <commons-beanutils-bundle-version>1.7.0_3</commons-beanutils-bundle-version>
      <commons-csv-version>1.0-r706899_3</commons-csv-version>
      <commons-configuration-version>1.6</commons-configuration-version>
      <commons-daemon-version>1.0.5</commons-daemon-version>
      <commons-digester-version>2.1</commons-digester-version>
      <commons-httpclient-bundle-version>3.1_7</commons-httpclient-bundle-version>
      <commons-io-bundle-version>1.3.2_3</commons-io-bundle-version>
      <commons-jxpath-version>1.3</commons-jxpath-version>
      <commons-net-version>2.2</commons-net-version>
      <commons-math-version>2.2</commons-math-version>
      <commons-dbcp-bundle-version>1.4_2</commons-dbcp-bundle-version>
      <dom4j-bundle-version>1.6.1_5</dom4j-bundle-version>
      <el-api-1.0-version>1.0.1</el-api-1.0-version>
      <fastinfoset-version>1.2.7_4</fastinfoset-version>
      <features.file>features.xml</features.file>
      <flatpack-bundle-version>3.2.0_2</flatpack-bundle-version>
      <felix-configadmin-version>1.2.4</felix-configadmin-version>
      <felix-framework-version>2.0.5</felix-framework-version>
      <freemarker-bundle-version>2.3.18_2</freemarker-bundle-version>
      <geronimo-el-version>1.0.1</geronimo-el-version>
      <geronimo-ws-metadata-spec-version>1.1.3</geronimo-ws-metadata-spec-version>
      <gernimo-annotation-spec-version>1.1.1</gernimo-annotation-spec-version>
      <gernimo-jaxws22-spec-version>1.1</gernimo-jaxws22-spec-version>
      <guice-bundle-version>2.0_2</guice-bundle-version>
      <hadoop-bundle-version>0.20.203.0_1</hadoop-bundle-version>
      <hapi-bundle-version>0.5.1_5</hapi-bundle-version>
      <hibernate-validator-bundle-version>4.1.0.Final_3</hibernate-validator-bundle-version>
      <ibatis-bundle-version>2.3.4.726_4</ibatis-bundle-version>
      <irclib-bundle-version>1.10_5</irclib-bundle-version>
      <isorelax-bundle-version>20050913_4</isorelax-bundle-version>
      <java-apns-bundle-version>0.1.6_3</java-apns-bundle-version>
      <jaxb-bundle-version>2.2.1.1_2</jaxb-bundle-version>
      <jasypt-bundle-version>1.7_3</jasypt-bundle-version>
      <jetty6-bundle-version>6.1.26_4</jetty6-bundle-version>
      <jexcelapi-bundle-version>2.4.2_4</jexcelapi-bundle-version>
      <javax.el-bundle-version>2.1.0</javax.el-bundle-version>
      <jdom-bundle-version>1.1_4</jdom-bundle-version>
      <jettison-bundle-version>1.3</jettison-bundle-version>
      <jing-bundle-version>20030619_4</jing-bundle-version>
      <jodatime-bundle-version>1.5.2_2</jodatime-bundle-version>
      <josql-bundle-version>1.5_5</josql-bundle-version>
      <jsch-bundle-version>0.1.44_2</jsch-bundle-version>
      <jsendnsca-bundle-version>1.3.1_3</jsendnsca-bundle-version>
      <jsp-api-2.1-version>1.0.1</jsp-api-2.1-version>
      <juel-bundle-version>2.1.2_2</juel-bundle-version>
      <junit-bundle-version>4.7_1</junit-bundle-version>
      <jsmpp-bundle-version>2.1.0_4</jsmpp-bundle-version>
      <kxml2-bundle-version>2.3.0_2</kxml2-bundle-version>
      <lucene-bundle-version>3.0.3_1</lucene-bundle-version>
      <mvel-bundle-version>2.0.18_3</mvel-bundle-version>
      <mina-bundle-version>1.1.7_6</mina-bundle-version>
      <neethi-bundle-version>3.0.1</neethi-bundle-version>
      <oro-bundle-version>2.0.8_6</oro-bundle-version>
      <openjpa-bundle-version>1.2.1_2</openjpa-bundle-version>
      <opensaml-version>2.4.1_1</opensaml-version>
      <oscache-bundle-version>2.4_5</oscache-bundle-version>
      <protobuf-java-bundle-version>2.3.0_3</protobuf-java-bundle-version>
      <quartz-bundle-version>1.8.5_2</quartz-bundle-version>
      <qpid-bundle-version>0.12_2</qpid-bundle-version>
      <quickfix-bundle-version>1.5.1_2</quickfix-bundle-version>
      <regexp-bundle-version>1.3_3</regexp-bundle-version>
      <rhino-bundle-version>1.7R2_3</rhino-bundle-version>
      <rome-bundle-version>1.0_2</rome-bundle-version>
      <saxon-bundle-version>9.1.0.8_2</saxon-bundle-version>
      <scala-bundle-version>2.9.1_2</scala-bundle-version>
      <scriptengines-version>1.1</scriptengines-version>
      <servlet-api-2.5-version>1.1.2</servlet-api-2.5-version>
      <serp-bundle-version>1.13.1_4</serp-bundle-version>
      <smack-bundle-version>3.2.0_1</smack-bundle-version>
      <solrj-bundle-version>3.5.0_2</solrj-bundle-version>
      <spring-osgi-version>1.2.1</spring-osgi-version>
      <spring-castor-bundle-version>1.2.0</spring-castor-bundle-version>
      <spymemcached-bundle-version>2.5_2</spymemcached-bundle-version>
      <stringtemplate-bundle-version>3.2_5</stringtemplate-bundle-version>
      <tagsoup-bundle-version>1.2_5</tagsoup-bundle-version>
      <velocity-bundle-version>1.7_4</velocity-bundle-version>
      <xalan-bundle-version>2.7.1_5</xalan-bundle-version>
      <xerces-bundle-version>2.9.1_5</xerces-bundle-version>
      <xmlbeans-bundle-version>2.5.0_2</xmlbeans-bundle-version>
      <xmlschema-version>2.0</xmlschema-version>
      <xmlsec-bundle-version>1.4.5_1</xmlsec-bundle-version>
      <xmlresolver-bundle-version>1.2_5</xmlresolver-bundle-version>
      <xpp3-bundle-version>1.1.4c_6</xpp3-bundle-version>
      <xstream-bundle-version>1.4.1_1</xstream-bundle-version>
      <werken-xpath-bundle-version>0.9.4_5</werken-xpath-bundle-version>
      <woodstox-core-bundle-version>${woodstox-version}</woodstox-core-bundle-version>
      <stax2-api-bundle-version>3.1.1</stax2-api-bundle-version>
      <saaj-impl-version>1.3.2_2</saaj-impl-version>
      <wsdl4j-bundle-version>1.6.2_6</wsdl4j-bundle-version>
      <wss4j-version>1.6.5</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>
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint</artifactId>
            <version>${aries-blueprint-version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.console</artifactId>
            <version>${karaf-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>snapshot</id>
          <repositories>
            <repository>
              <id>pax.snapshot.repo</id>
              <name>PAX SNAPSHOT Deploy Repository </name>
              <url>https://oss.sonatype.org/content/repositories/ops4j-snapshots/</url>
              <releases>
                <enabled>false</enabled>
              </releases>
              <snapshots>
                <enabled>true</enabled>
              </snapshots>
            </repository>
          </repositories>
       </profile>
       <profile>
          <id>validate</id>
          <!-- Added the repository for the google script -->
          <repositories>
            <repository>
              <id>google.script.repo</id>
              <name>Google Script Engine Deploy Repository </name>
              <url>http://scriptengines.googlecode.com/svn/m2-repo/</url>
              <releases>
                <enabled>true</enabled>
              </releases>
              <snapshots>
                <enabled>false</enabled>
              </snapshots>
            </repository>
          </repositories>
          <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>
                       <jreVersion>jre-1.6</jreVersion>
                   </configuration>
                   <executions>
                     <execution>
                       <id>validate</id>
                       <phase>process-resources</phase>
                       <goals>
                         <goal>validate</goal>
                       </goals>
                     </execution>
                   </executions>
               </plugin>
              </plugins>
           </build>
        </profile>
     </profiles>

</project>
