<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         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>
        <groupId>com.garethahealy</groupId>
        <artifactId>osgi-parent</artifactId>
        <version>1.1.0</version>
        <relativePath>../osgi-parent</relativePath>
    </parent>
    <artifactId>camel-parent</artifactId>
    <packaging>pom</packaging>
    <name>POMs :: Fuse/Camel Parent</name>

    <properties>
        <commons-bom-version>1.1.0</commons-bom-version>
        <!-- START commons-bom properties -->
        <!-- Below is here for features.xml property resolvers -->
        <!-- Database -->
        <openjpa-version>2.4.0</openjpa-version>
        <hibernate-core-version>5.0.5.Final</hibernate-core-version>
        <mysql-connector-version>5.1.38</mysql-connector-version>
        <geronimo-jpa-version>1.1</geronimo-jpa-version>
        <!-- Commons -->
        <commons-dbcp2-version>2.1.1</commons-dbcp2-version>
        <commons-pool2-version>2.4.2</commons-pool2-version>
        <commons-lang3-version>3.4</commons-lang3-version>
        <commons-io-version>2.4</commons-io-version>
        <commons-collections4-version>4.1</commons-collections4-version>
        <!-- Other -->
        <joda-time-version>2.9.1</joda-time-version>
        <!-- END commons-bom properties -->

        <!-- BOM -->
        <jboss-fuse-bom-version>${fuse-version}</jboss-fuse-bom-version>
        <!-- Properties from BOM -->
        <fuse-version>6.2.1.redhat-084</fuse-version>
        <camel-version>2.15.1.redhat-621084</camel-version>
        <cxf-version>3.0.4.redhat-621084</cxf-version>
        <activemq-version>5.11.0.redhat-621084</activemq-version>
        <karaf-version>2.4.0.redhat-621084</karaf-version>
        <fabric8-version>1.2.0.redhat-621084</fabric8-version>

        <!-- Not sure if below is still needed from ###here-->
        <jndi-feature-version>1.0.0</jndi-feature-version>

        <!-- geronimo-jpa.version -->
        <jpa-feature-version>1.1</jpa-feature-version>

        <!-- geronimo-jta.version -->
        <transaction-feature-version>1.1.1</transaction-feature-version>

        <!-- Other -->
        <aries-jpa-blueprint-version>1.0.1.redhat-610379</aries-jpa-blueprint-version>
        <aries-transaction-blueprint-version>1.0.1.redhat-610379</aries-transaction-blueprint-version>
        <aries-whiteboard-version>1.0.0</aries-whiteboard-version>
        <asm-all-version>4.0</asm-all-version>
        <cglib-version>3.1_1</cglib-version>
        <serp-version>1.14.1_1</serp-version>
        <!-- ###to here-->

        <!-- Ranges for versions -->
        <persistence-range-version>"[1.1,2)"</persistence-range-version>
        <dbcp-range-version>"[2.1,2.2)"</dbcp-range-version>
        <javassist-range-version>"[3.18,4)"</javassist-range-version>
        <hibernate-range-version>"[5.0,5.1)"</hibernate-range-version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.camel</groupId>
                    <artifactId>camel-maven-plugin</artifactId>
                    <version>${camel-version}</version>
                </plugin>
                <plugin>
                    <!-- http://fabric8.io/gitbook/mavenPlugin.html -->
                    <groupId>io.fabric8</groupId>
                    <artifactId>fabric8-maven-plugin</artifactId>
                    <version>${fabric8-maven-plugin-version}</version>
                </plugin>
                <plugin>
                    <!-- http://activemq.apache.org/activemq-performance-module-users-manual.html -->
                    <groupId>org.apache.activemq.tooling</groupId>
                    <artifactId>activemq-perf-maven-plugin</artifactId>
                    <version>${activemq-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-codegen-plugin</artifactId>
                    <version>${cxf-version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-maven-plugin</artifactId>
                <configuration>
                    <useBlueprint>true</useBlueprint>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xml-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <validationSets>
                        <validationSet>
                            <!-- Check the blueprints.xml is valid -->
                            <dir>src/main/resources/OSGI-INF/blueprint</dir>
                            <systemId>https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd</systemId>
                        </validationSet>
                    </validationSets>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- Components -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.garethahealy</groupId>
                <artifactId>commons-bom</artifactId>
                <version>${commons-bom-version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.fuse.bom</groupId>
                <artifactId>jboss-fuse-parent</artifactId>
                <version>${jboss-fuse-bom-version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Camel -->
            <dependency>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-test-blueprint</artifactId>
                <version>${camel-version}</version>
                <scope>test</scope>
            </dependency>

            <!-- Core CXF: NOTE: The order of when ASM is loaded is important. Do NOT change! -->
            <dependency>
                <!-- IncompatibleClassChangeError: class org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator
                    has interface org.objectweb.asm.ClassVisitor as super class -->
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-all</artifactId>
                <version>${asm-all-version}</version>
                <scope>test</scope>
            </dependency>

            <!-- Database -->
            <dependency>
                <groupId>org.apache.aries.jpa</groupId>
                <artifactId>org.apache.aries.jpa.blueprint.aries</artifactId>
                <version>${aries-jpa-blueprint-version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.aries.transaction</groupId>
                <artifactId>org.apache.aries.transaction.blueprint</artifactId>
                <version>${aries-transaction-blueprint-version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Core Camel -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-blueprint</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Testing: Used to resolve blueprint namespaces -->
        <dependency>
            <groupId>org.apache.aries.blueprint</groupId>
            <artifactId>org.apache.aries.blueprint</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Testing: Camel -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-test-blueprint</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>
