<?xml version="1.0" encoding="UTF-8"?>
<!--

     Copyright 2005-2014 Red Hat, Inc.

     Red Hat 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.

-->
<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>tooling</artifactId>
        <groupId>io.fabric8</groupId>
        <version>1.2.0.Beta4</version>
    </parent>

    <groupId>io.fabric8</groupId>
    <artifactId>camel-tooling-util</artifactId>
    <packaging>bundle</packaging>

    <name>Fabric8 :: Tooling :: Camel Util</name>

    <properties>
        <fuse.osgi.export>
            io.fabric8.camel.tooling.util.*,
            de.pdark.decentxml.*
        </fuse.osgi.export>
        <fuse.osgi.import>
            !javax.xml*,
            !org.xml.sax,
            *
        </fuse.osgi.import>
        <fuse.osgi.bundle.name>Fabric8 Camel Tooling Plugin</fuse.osgi.bundle.name>
        <fuse.osgi.embed.dependency>*;scope=compile|runtime;inline=true;artifactId=decentxml
        </fuse.osgi.embed.dependency>

        <camel.file>src/test/resources/simpleRoute.xml</camel.file>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${spring-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-blueprint</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>de.pdark</groupId>
            <artifactId>decentxml</artifactId>
            <version>1.4</version>
        </dependency>

        <!-- testing -->
        <dependency>
            <groupId>io.fabric8.insight</groupId>
            <artifactId>insight-maven</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j-version}</version>
            <scope>test</scope>
        </dependency>

        <!--
            <dependency>
              <groupId>org.drools</groupId>
              <artifactId>drools-core</artifactId>
              <version>${drools-version}</version>
              <scope>test</scope>
            </dependency>
            <dependency>
              <groupId>${drools-spring-groupId}</groupId>
              <artifactId>${drools-spring-artifactId}</artifactId>
              <version>${drools-version}</version>
              <scope>test</scope>
            </dependency>
            <dependency>
              <groupId>${drools-camel-groupId}</groupId>
              <artifactId>${drools-camel-artifactId}</artifactId>
              <version>${drools-version}</version>
              <scope>test</scope>
        -->
        <!-- Need to align Camel and CXF versions here or we have two
             different versions of CXF libs in the dep tree -->
        <!--
              <exclusions>
                <exclusion>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                  <groupId>org.apache.cxf</groupId>
                  <artifactId>cxf-rt-frontend-jaxws</artifactId>
                </exclusion>
                <exclusion>
                  <groupId>org.apache.cxf</groupId>
                  <artifactId>org.apache.cxf:cxf-bundle-jaxrs</artifactId>
                </exclusion>
              </exclusions>
            </dependency>
        -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-test</artifactId>
            <version>${camel-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cxf</artifactId>
            <version>${camel-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jaxb</artifactId>
            <version>${camel-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${cxf-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-bundle-jaxrs</artifactId>
            <version>${cxf-version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.camel.archetypes</groupId>
            <artifactId>camel-archetype-activemq</artifactId>
            <version>${camel-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.archetypes</groupId>
            <artifactId>camel-archetype-spring</artifactId>
            <version>${camel-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.archetypes</groupId>
            <artifactId>camel-archetype-java</artifactId>
            <version>${camel-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.archetypes</groupId>
            <artifactId>camel-archetype-component</artifactId>
            <version>${camel-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.archetypes</groupId>
            <artifactId>camel-archetype-dataformat</artifactId>
            <version>${camel-version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-embedder</artifactId>
            <version>3.0.5</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-utils</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.sonatype.plexus</groupId>
                    <artifactId>plexus-cipher</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-cipher</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-invoker</artifactId>
            <version>2.1.1</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-utils</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Bundle-SymbolicName>${project.groupId}.${project.artifactId}.source</Bundle-SymbolicName>
                            <Bundle-Version>${fuse.osgi.version.clean}</Bundle-Version>
                            <Eclipse-SourceBundle>
                                ${project.groupId}.${project.artifactId};version="${fuse.osgi.version.clean}"
                            </Eclipse-SourceBundle>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- skip this test as it requires some manual setup
                    initializationError(org.fusesource.camel.tooling.util.ArchetypeTest): No file available at /Users/davsclaus/.repo.fusesource.com.properties to contain the username and password to connect to the fusesource repo!
                    -->
                    <excludes>
                        <!--<exclude>**/ArchetypeTest.*</exclude>-->
                    </excludes>
                    <systemPropertyVariables>
                        <camel-version>${camel-version}</camel-version>
                        <basedir>${basedir}</basedir>
                        <project.version>${project.version}</project.version>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
