<?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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>uk.ac.ebi.ddi.maven</groupId>
    <artifactId>ddi-base-master</artifactId>
    <version>1.7</version>
    <packaging>pom</packaging>

    <name>DDI master pom file</name>
    <description>Parent pom DDI project</description>

    <developers>
        <developer>
            <id>ypriverol</id>
            <name>Yasset Perez-Riverol</name>
            <email>yperez@ebi.ac.uk</email>
            <roles>
                <role>Author</role>
            </roles>
            <organization>http://www.ebi.ac.uk/ddi</organization>
        </developer>
        <developer>
            <id>tvu</id>
            <name>Manh Tu VU</name>
            <email>tvu@ebi.ac.uk</email>
            <roles>
                <role>Author</role>
            </roles>
            <organization>http://www.ebi.ac.uk/ddi</organization>
        </developer>
        <developer>
            <id>gdass</id>
            <name>Gaurhari Dass</name>
            <email>gdass@ebi.ac.uk</email>
            <roles>
                <role>Author</role>
            </roles>
            <organization>http://www.ebi.ac.uk/ddi</organization>
        </developer>
    </developers>

    <url>https://github.com/OmicsDI/ddi-base-master.git</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:github.com/OmicsDI/ddi-base-master.git</connection>
        <developerConnection>scm:git:git@github.com:OmicsDI/ddi-base-master.git</developerConnection>
        <url>https://github.com/OmicsDI/ddi-base-master.git</url>
        <tag>ddi-base-master-1.7</tag>
    </scm>

    <properties>
        <!-- Project defaults -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>


        <!-- Spring -->
        <spring.version>4.2.2.RELEASE</spring.version>
        <spring.batch.version>3.0.5.RELEASE</spring.batch.version>
        <spring.security.version>3.2.4.RELEASE</spring.security.version>
        <spring.data.mongo.version>1.9.0.RELEASE</spring.data.mongo.version>
        <spring.rmqp.version>1.0.0.RELEASE</spring.rmqp.version>
        <spring.orm.version>4.1.6.RELEASE</spring.orm.version>
        <spring.social.twitter>1.0.5.RELEASE</spring.social.twitter>

        <!-- Web -->
        <servlet.version>2.5</servlet.version>
        <jsp.version>2.1</jsp.version>
        <jstl.version>1.2</jstl.version>
        <apache.tiles.version>2.2.2</apache.tiles.version>

        <!--&lt;!&ndash; DB &ndash;&gt;-->
        <!--<mongo.java.driver.version>3.0.0</mongo.java.driver.version>-->


        <!-- Commons -->
        <commons.dbcp.version>1.2.2</commons.dbcp.version>
        <commons.lang.version>2.6</commons.lang.version>
        <commons.lang3.version>3.0</commons.lang3.version>
        <commons.io.version>1.3.2</commons.io.version>
        <commons.httpclient.version>4.5</commons.httpclient.version>
        <commons.fileupload.version>1.2</commons.fileupload.version>
        <java.validation.api.version>1.1.0.Final</java.validation.api.version>
        <common.cli.version>1.2</common.cli.version>
        <commons.configuration.version>1.10</commons.configuration.version>
        <commons.collections.version>3.2.1</commons.collections.version>
        <common.net.version>3.3</common.net.version>

        <!-- Misc -->
        <solrj.version>4.1.0</solrj.version>
        <cglib.version>2.2.2</cglib.version>
        <jackson.version>1.9.9</jackson.version>
        <aspectj.version>1.6.9</aspectj.version>

        <!-- Testing -->
        <junit.version>4.10</junit.version>
        <hamcrest.version>1.3</hamcrest.version>
        <mockito.version>1.9.5</mockito.version>

        <!-- Logging -->
        <slf4j.version>1.6.4</slf4j.version>
        <log4j.version>1.2.14</log4j.version>
        <slf4j-log4j12.version>1.7.12</slf4j-log4j12.version>
        <logback.version>1.0.7</logback.version>

        <!-- Maven -->
        <maven.resources.plugin.version>2.5</maven.resources.plugin.version>
        <maven.jar.plugin>2.3.2</maven.jar.plugin>
        <maven.compiler.plugin>2.5.1</maven.compiler.plugin>
        <maven.source.plugin>2.1.2</maven.source.plugin>
        <maven.javadoc.plugin>2.8.1</maven.javadoc.plugin>
        <maven.war.plugin>2.1.1</maven.war.plugin>
        <maven.surefire.plugin>2.12</maven.surefire.plugin>
        <maven.jetty.plugin>6.1.10</maven.jetty.plugin>

        <!-- JAXB -->
        <jaxb-xjc.version>2.2.7</jaxb-xjc.version>
        <jackson.databind.version>2.5.2</jackson.databind.version>
        <fastutil.version>6.5.1</fastutil.version>
        <woodstox.version>4.4.1</woodstox.version>

        <org.json.version>20090211</org.json.version>
        <gson.version>2.3.1</gson.version>

    </properties>

    <profiles>
        <!-- The Configuration of the development profile -->
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <skip.integration.tests>true</skip.integration.tests>
                <skip.unit.tests>false</skip.unit.tests>
            </properties>
        </profile>
        <!-- The Configuration of the integration-test profile -->
        <profile>
            <id>integration-test</id>
            <properties>
                <!--
                    Only integration tests are run when the integration-test profile is active
                -->
                <skip.integration.tests>false</skip.integration.tests>
                <skip.unit.tests>true</skip.unit.tests>
            </properties>
        </profile>
        <!-- GPG Signature on release -->
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
        </profile>

        <profile>
            <id>disable-java8-doclint</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <additionalparam>-Xdoclint:none</additionalparam>
            </properties>
        </profile>
    </profiles>


    <dependencyManagement>
        <dependencies>
            <!-- JUNIT -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>

            <!--</dependency>-->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- logging -->
            <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>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j-log4j12.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <resources>
            <!--
                Placeholders that are found from the files located in the configured resource
                directories are replaced with the property values found from the profile
                specific configuration file.
            -->
            <resource>
                <filtering>true</filtering>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.9.1</version>
                <executions>
                    <!-- Add a new source directory to our build -->
                    <execution>
                        <id>add-integration-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <!-- Configures the source directory of our integration tests -->
                            <sources>
                                <source>src/integration-test/java</source>
                            </sources>
                        </configuration>
                    </execution>
                    <!-- Add a new resource directory to our build -->
                    <execution>
                        <id>add-integration-test-resources</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>add-test-resource</goal>
                        </goals>
                        <configuration>
                            <!-- Configures the resource directory of our integration tests -->
                            <resources>
                                <!--
                                    Placeholders that are found from the files located in the configured resource
                                    directories are replaced with the property values found from the profile
                                    specific configuration file.
                                -->
                                <resource>
                                    <filtering>true</filtering>
                                    <directory>src/integration-test/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Runs unit tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>

                <version>2.20.1</version>
                <configuration>
                    <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
                    <!-- Skips unit tests if the value of skip.unit.tests property is true -->
                    <skipTests>${skip.unit.tests}</skipTests>
                    <!-- Excludes integration tests when unit tests are run -->
                    <excludes>
                        <exclude>**/IT*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- Runs integration tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M3</version>
                <configuration>
                    <!--
                        Skips integration tests if the value of skip.integration.tests
                        property is true
                    -->
                    <skipITs>${skip.integration.tests}</skipITs>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>${java.version}</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

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

            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <arguments>-Dgpg.passphrase=${gpg.phrase}</arguments>
                    <checkModificationExcludes>
                        <checkModificationExclude>pom.xml</checkModificationExclude>
                    </checkModificationExcludes>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.9.5</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.plugin}</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-source</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven.war.plugin}</version>
                </plugin>
                <!--unit tests-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.plugin}</version>
                    <configuration>
                        <parallel>methods</parallel>
                        <threadCount>10</threadCount>
                        <!-- Show the test errors on console -->
                        <useFile>false</useFile>
                        <printSummary>false</printSummary>
                        <includes>
                            <include>**/*Tests.java</include>
                            <include>**/*Test.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/Abstract*.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/
            </url>
        </repository>
    </distributionManagement>
</project>