<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.ops4j</groupId>
        <artifactId>master</artifactId>
        <version>3.2.0</version>
    </parent>

    <artifactId>orient</artifactId>
    <version>0.2.0</version>
    <packaging>pom</packaging>

    <name>OPS4J OrientDB Extensions Reactor</name>
    <inceptionYear>2013</inceptionYear>

    <scm>
        <connection>scm:git:git@github.com:ops4j/org.ops4j.orient.git</connection>
        <developerConnection>scm:git:git@github.com:ops4j/org.ops4j.orient.git</developerConnection>
        <url>git@github.com:ops4j/org.ops4j.orient.git</url>
        <tag>orient-0.2.0</tag>
    </scm>


    <properties>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
        <logback.version>1.0.4</logback.version>
        <orientdb.version>1.5.0</orientdb.version>
        <slf4j.version>1.6.6</slf4j.version>
        <spring.version>3.2.3.RELEASE</spring.version>
    </properties>

    <modules>
        <module>orient-ra-api</module>
        <module>orient-ra</module>
        <module>orient-rar</module>
        <module>orient-samples</module>
        <module>orient-spring-tx</module>
        <module>orient-itest</module>
    </modules>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-j2ee-connector_1.6_spec</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jta_1.1_spec</artifactId>
                <version>1.1.1</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-ejb_3.1_spec</artifactId>
                <version>1.0.2</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jpa_2.0_spec</artifactId>
                <version>1.1</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-annotation_1.1_spec</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jcdi_1.0_spec</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-atinject_1.0_spec</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>javax.faces</groupId>
                <artifactId>jsf-api</artifactId>
                <version>2.1</version>
                <scope>provided</scope>
            </dependency>


            <dependency>
                <groupId>com.orientechnologies</groupId>
                <artifactId>orientdb-core</artifactId>
                <version>${orientdb.version}</version>
            </dependency>

            <dependency>
                <groupId>com.orientechnologies</groupId>
                <artifactId>orientdb-client</artifactId>
                <version>${orientdb.version}</version>
            </dependency>

            <dependency>
                <groupId>com.orientechnologies</groupId>
                <artifactId>orientdb-object</artifactId>
                <version>${orientdb.version}</version>
                <exclusions>
                    <!-- conflicts with other versions provided by some Java EE servers -->
                    <exclusion>
                        <groupId>org.javassist</groupId>
                        <artifactId>javassist</artifactId>
                    </exclusion>
                    <!-- provided by Java EE server -->
                    <exclusion>
                        <groupId>org.hibernate.javax.persistence</groupId>
                        <artifactId>hibernate-jpa-2.0-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>

            <!-- version used by OrientDB 1.3.0. 3.15 and lower is not compatible. -->
            <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>3.16.1-GA</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-rar-plugin</artifactId>
                    <version>2.3</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <id>process-remote-resources</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <resourceBundles>
                                <resourceBundle>org.ops4j.resources:ops4j-jar-txt-resource-bundle:1.0.0</resourceBundle>
                            </resourceBundles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>
    <profiles>
        <profile>
            <id>javaee6</id>
            <activation>
                <file>
                   <exists>src/profile/javaee6</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-endorsed</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${endorsed.dir}</outputDirectory>
                                    <silent>true</silent>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.apache.geronimo.specs</groupId>
                                            <artifactId>geronimo-annotation_1.1_spec</artifactId>
                                            <version>1.0.1</version>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <compilerArguments>
                                <endorseddirs>${endorsed.dir}</endorseddirs>
                            </compilerArguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>