<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2017 Claudiu Soroiu
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>ro.derbederos</groupId>
    <artifactId>untwist</artifactId>
    <version>0.2</version>

    <name>untwist</name>
    <description>Java 8+ collection of PRNG's from CLR (.NET), FreePascal, TurboPascal, Python.</description>
    <url>https://github.com/csoroiu/untwist</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/csoroiu/untwist</url>
        <connection>scm:git:https://github.com/csoroiu/untwist.git</connection>
        <developerConnection>scm:git:https://github.com/csoroiu/untwist.git</developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/csoroiu/untwist/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/csoroiu/untwist</url>
        <notifiers/>
    </ciManagement>

    <developers>
        <developer>
            <name>Claudiu Soroiu</name>
            <url>https://github.com/csoroiu/</url>
            <organization>Derbederos</organization>
        </developer>
    </developers>

    <properties>
        <!--<downloadSources>true</downloadSources>-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <commons-math3.version>3.6.1</commons-math3.version>
        <junit.version>4.12</junit.version>
        <hamcrest.version>1.3</hamcrest.version>
        <jacoco.version>0.7.9</jacoco.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <configuration>
                            <!-- compile everything to ensure module-info contains right entries -->
                            <!-- required when JAVA_HOME is JDK 8 or below -->
                            <release>9</release>
                        </configuration>
                    </execution>
                    <execution>
                        <id>base-compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <!-- recompile everything for target VM except the module-info.java -->
                        <configuration>
                            <excludes>
                                <exclude>module-info.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <!-- Only required when JAVA_HOME isn't at least Java 9 and when haven't configured the maven-toolchains-plugin -->
                    <jdkToolchain>
                        <version>9</version>
                    </jdkToolchain>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgs>
                        <compilerArg>-Xlint:all</compilerArg>
                    </compilerArgs>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.0-M1</version>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <source>1.8</source>
                    <sourceFileExcludes>
                        <sourceFileExclude>module-info.java</sourceFileExclude>
                    </sourceFileExcludes>
                    <!-- this seems to be an issue with javadoc which needs User-Agent set -->
                    <additionalJOption>-J-Dhttp.agent=javadoc</additionalJOption>
                    <failOnError>false</failOnError>
                    <links>
                        <link>http://static.javadoc.io/org.apache.commons/commons-math3/${commons-math3.version}</link>
                    </links>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>${commons-math3.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.tngtech.java</groupId>
            <artifactId>junit-dataprovider</artifactId>
            <version>1.12.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>${commons-math3.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>


    </dependencies>

    <profiles>
        <profile>
            <id>jacoco</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco.version}</version>
                        <executions>
                            <execution>
                                <id>jacoco-initialize</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <destFile>${project.build.directory}/jacoco-ut.exec</destFile>
                                </configuration>
                            </execution>
                            <execution>
                                <id>jacoco-report</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <dataFile>${project.build.directory}/jacoco-ut.exec</dataFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>