<?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.0.6</version>
        <relativePath>../osgi-parent</relativePath>
    </parent>
    <artifactId>camel-parent</artifactId>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>

    <properties>
        <!-- Properties from BOM -->
        <fuse-version>6.1.0.redhat-379</fuse-version>
        <camel-version>2.12.0.redhat-610379</camel-version>
        <cxf-version>2.7.0.redhat-610379</cxf-version>
        <activemq-version>5.9.0.redhat-610379</activemq-version>
        <karaf-version>2.3.0.redhat-610379</karaf-version>
        <fabric8-version>1.0.0.redhat-379</fabric8-version>

        <jndi-feature-version>1.0.0</jndi-feature-version>

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

        <!-- aries-transaction-version>-->
        <transaction-feature-version>1.0.1.redhat-610379</transaction-feature-version>

        <!-- BOM -->
        <jboss-fuse-bom-version>${fuse-version}</jboss-fuse-bom-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>

        <!-- Ranges for versions -->
        <persistence-range-version>"[1.1,2)"</persistence-range-version>
        <dbcp-range-version>"[2.0,2.1)"</dbcp-range-version>
        <javassist-range-version>"[3.18,4)"</javassist-range-version>
        <hibernate-range-version>"[4.2,4.3)"</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>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>
