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

    <groupId>org.deeplearning4j</groupId>
    <artifactId>rl4j</artifactId>
    <version>0.7.0</version>
    <modules>
        <module>rl4j-api</module>
        <module>rl4j-core</module>
        <module>rl4j-gym</module>
        <module>rl4j-doom</module>
    </modules>
    <packaging>pom</packaging>

    <name>rl4j</name>
    <description>Deep Reinforcement Learning for the JVM</description>
    <url>https://github.com/deeplearning4j/rl4j</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
      <developer>
        <id>rubenfiszel</id>
        <name>Ruben Fiszel</name>
        <email>ruben.fiszel@epfl.ch</email>
      </developer>
    </developers>

    <scm>
        <url>scm:git:git@github.com:deeplearning4j/rl4j.git</url>
        <connection>scm:git:git@github.com:deeplearning4j/rl4j.git</connection>
        <developerConnection>scm:git:git@github.com:deeplearning4j/rl4j.git</developerConnection>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>nexus-releases</id>
            <name>Nexus Release Repository</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <unirest.version>1.4.9</unirest.version>
        <jackson.version>2.8.1</jackson.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <nd4j.version>0.7.0</nd4j.version>
        <dl4j.version>0.7.0</dl4j.version>
        <javacv.version>1.2</javacv.version>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>


    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.10</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.6</version>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
                <extensions>true</extensions>
                <configuration>
                    <serverId>nexus-releases</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <skipStagingRepositoryClose>true</skipStagingRepositoryClose>
                </configuration>
            </plugin>
            <plugin>
              <groupId>com.lewisd</groupId>
              <artifactId>lint-maven-plugin</artifactId>
              <version>0.0.8</version>
              <configuration>
                <failOnViolation>true</failOnViolation>
                <onlyRunRules>
                  <rule>DuplicateDep</rule>
                  <rule>RedundantDepVersion</rule>
                  <rule>RedundantPluginVersion</rule>
                  <rule>VersionProp</rule>
                  <rule>DotVersionProperty</rule>
                </onlyRunRules>
                <xmlOutputFile>${project.build.directory}/maven-lint-result.xml</xmlOutputFile>
              </configuration>
              <executions>
                <execution>
                  <id>pom-lint</id>
                  <phase>validate</phase>
                  <goals>
                    <goal>check</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
