<?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>com.bluecatcode.common</groupId>
    <artifactId>project</artifactId>
    <version>1.1.0</version>
    <packaging>pom</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Extensions for popular Java libraries</description>
    <url>https://github.com/pawelprazak/java-extended</url>
    <inceptionYear>2013</inceptionYear>

    <distributionManagement>
        <repository>
            <id>bintray-repo-maven</id>
            <url>https://api.bintray.com/maven/pawelprazak/maven/java-extended;publish=1</url>
        </repository>
    </distributionManagement>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/pawelprazak/java-extended/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:https://github.com/pawelprazak/java-extended.git</connection>
        <developerConnection>scm:git:git@github.com:pawelprazak/java-extended.git</developerConnection>
        <url>git@github.com:pawelprazak/java-extended.git</url>
    </scm>

    <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>
            <name>Paweł Prażak</name>
            <email>pawel@bluecatcode.com</email>
            <organization>Blue Cat Code</organization>
            <organizationUrl>http://www.bluecatcode.com</organizationUrl>
        </developer>
    </developers>

    <prerequisites>
        <maven>3.0.5</maven>
    </prerequisites>

    <properties>
        <!-- Build properties -->
        <encoding>UTF-8</encoding>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>

        <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssa</maven.build.timestamp.format>
        <timestamp>${maven.build.timestamp}</timestamp>

        <jdk.version>1.8</jdk.version>
        <jdk-target.version>1.6</jdk-target.version>
        <scala.version>2.11.8</scala.version>

        <!-- Test dependencies -->
        <junit.version>4.12</junit.version>
        <mockito.version>1.10.19</mockito.version>
        <hamcrest.version>1.3</hamcrest.version>

        <!-- Test only dependencies -->
        <spock-core.version>1.0-groovy-2.4</spock-core.version>
        <groovy-all.version>2.4.6</groovy-all.version>
        <cglib-nodep.version>3.2.2</cglib-nodep.version>
        <objenesis.version>2.3</objenesis.version>

        <!-- Test argument line (will be also used with jacoco) -->
        <argLine>-XX:PermSize=512m -XX:MaxPermSize=1024m -XX:+UseCompressedOops -XX:+TieredCompilation -XX:TieredStopAtLevel=1</argLine>

        <!-- Maven profiles properties -->
        <skipUnitTests>false</skipUnitTests>
        <skipIntegrationTests>true</skipIntegrationTests>
        <skipMutationTests>true</skipMutationTests>
        <skipCoverageTest>true</skipCoverageTest>
        <skipDependencyTest>true</skipDependencyTest>
        <skipSourceGeneration>true</skipSourceGeneration>
        <skipJavadocGeneration>true</skipJavadocGeneration>
    </properties>

    <modules>
        <!-- test -->
        <module>junit</module>
        <module>hamcrest</module>
        <module>mockito</module>
        <!-- main -->
        <module>time</module>
        <module>guava</module>
    </modules>

    <dependencyManagement>
        <dependencies>

            <!-- Google Auto Value -->
            <dependency>
                <groupId>com.google.auto.value</groupId>
                <artifactId>auto-value</artifactId>
                <version>1.2</version>
            </dependency>

            <!-- JSR 305 -->
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.1</version>
            </dependency>

            <!-- JUnit -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>

            <!-- Hamcrest -->
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>

            <!-- Mockito -->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito.version}</version>
            </dependency>

            <!-- EqualsVerifier -->
            <dependency>
                <groupId>nl.jqno.equalsverifier</groupId>
                <artifactId>equalsverifier</artifactId>
                <version>2.1</version>
            </dependency>

            <!-- Used in some tests -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.4</version>
            </dependency>

            <!-- Dependencies for ScalaTest -->
            <dependency>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest_2.11</artifactId>
                <version>2.2.6</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.scalacheck</groupId>
                <artifactId>scalacheck_2.11</artifactId>
                <version>1.12.5</version><!-- there were issues with 1.13.0 https://github.com/rickynils/scalacheck/issues/217 -->
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>${scala.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- Mandatory dependencies for using Spock -->
            <dependency>
                <groupId>org.spockframework</groupId>
                <artifactId>spock-core</artifactId>
                <version>${spock-core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency> <!-- Updates Groovy compiler version -->
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-all</artifactId>
                <version>${groovy-all.version}</version>
                <scope>test</scope>
            </dependency>
            <!-- Optional dependencies for using Spock -->
            <dependency> <!-- enables mocking of classes (in addition to interfaces) -->
                <groupId>cglib</groupId>
                <artifactId>cglib-nodep</artifactId>
                <version>${cglib-nodep.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency> <!-- enables mocking of classes without default constructor (together with CGLIB) -->
                <groupId>org.objenesis</groupId>
                <artifactId>objenesis</artifactId>
                <version>${objenesis.version}</version>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <defaultGoal>install</defaultGoal>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <encoding>${encoding}</encoding>
                        <compilerVersion>${jdk.version}</compilerVersion>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                        <compilerArgument>-Xlint:all</compilerArgument>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <!-- in Maven 3.x, you need to include the fork parameter when specifying the executable -->
                        <fork>true</fork>
                        <executable>${env.JAVA8_HOME}/bin/javac</executable>
                    </configuration>
                    <!-- for scala-maven-plugin -->
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>net.orfjackal.retrolambda</groupId>
                    <artifactId>retrolambda-maven-plugin</artifactId>
                    <version>2.3.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>process-main</goal>
                                <goal>process-test</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <target>${jdk-target.version}</target>
                        <defaultMethods>true</defaultMethods>
                        <fork>true</fork>
                        <java8home>${env.JAVA8_HOME}</java8home>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <encoding>${encoding}</encoding>
                        <nonFilteredFileExtensions>
                            <nonFilteredFileExtension>pem</nonFilteredFileExtension>
                            <nonFilteredFileExtension>jks</nonFilteredFileExtension>
                            <nonFilteredFileExtension>key</nonFilteredFileExtension>
                            <nonFilteredFileExtension>pub</nonFilteredFileExtension>
                        </nonFilteredFileExtensions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>3.2.2</version>
                    <executions>
                        <execution>
                            <id>scala-compile-first</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>add-source</goal>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>scala-test-compile</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <scalaVersion>${scala.version}</scalaVersion>
                        <encoding>${encoding}</encoding>
                        <sendJavaToScalac>true</sendJavaToScalac>
                        <useZincServer>true</useZincServer>
                        <useFsc>false</useFsc>
                        <verbose>false</verbose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19.1</version>
                    <configuration>
                        <skipTests>${skipUnitTests}</skipTests>
                        <includes>
                            <include>**/*Test.java</include>
                            <include>**/*Spec.class</include>
                            <include>**/*Suite.class</include>
                        </includes>
                        <excludes>
                            <exclude>**/manual/**</exclude>
                            <exclude>**/broken/**</exclude>
                            <exclude>**/*IT.java</exclude>
                        </excludes>
                        <useFile>false</useFile>
                        <!-- to get useful output when tests fail -->
                        <parallel>classesAndMethods</parallel>
                        <threadCount>4</threadCount>
                        <runOrder>failedfirst</runOrder>
                        <jvm>${env.JAVA7_HOME}/bin/java</jvm>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.19.1</version>
                    <configuration>
                        <skipTests>${skipIntegrationTests}</skipTests>
                        <includes>
                            <include>**/*IT.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/manual/**</exclude>
                            <exclude>**/broken/**</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.pitest</groupId>
                    <artifactId>pitest-maven</artifactId>
                    <version>1.1.10</version>
                    <configuration>
                        <skip>${skipMutationTests}</skip>
                        <verbose>false</verbose>
                        <threads>4</threads>
                        <mutateStaticInitializers>true</mutateStaticInitializers>
                        <failWhenNoMutations>false</failWhenNoMutations>
                        <withHistory>true</withHistory>
                        <targetClasses>
                            <param>com.bluecatcode*</param>
                        </targetClasses>
                        <targetTests>
                            <param>com.bluecatcode*</param>
                        </targetTests>
                        <excludedClasses>
                            <pattern>*$$Lambda$*</pattern>
                        </excludedClasses>
                        <outputFormats>
                            <outputFormat>HTML</outputFormat>
                            <outputFormat>XML</outputFormat>
                        </outputFormats>
                    </configuration>
                    <executions>
                        <execution>
                            <id>pit-execute-mutation-coverage</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>mutationCoverage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.4.3</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                        </execution>
                    </executions>
                    <inherited>true</inherited>
                    <configuration>
                        <shadedArtifactAttached>false</shadedArtifactAttached>
                        <createDependencyReducedPom>true</createDependencyReducedPom>
                        <minimizeJar>true</minimizeJar>
                        <filters>
                            <filter>
                                <artifact>*:*</artifact>
                                <excludes>
                                    <exclude>META-INF/*.SF</exclude>
                                    <exclude>META-INF/*.DSA</exclude>
                                    <exclude>META-INF/*.RSA</exclude>
                                    <exclude>META-INF/*.RSA</exclude>
                                    <exclude>META-INF/license/**</exclude>
                                    <exclude>META-INF/LICENSE</exclude>
                                    <exclude>META-INF/LICENSE.txt</exclude>
                                    <exclude>META-INF/DEPENDENCIES</exclude>
                                    <exclude>META-INF/NOTICE</exclude>
                                    <exclude>META-INF/NOTICE.txt</exclude>
                                    <exclude>META-INF/maven/**</exclude>
                                    <exclude>LICENSE</exclude>
                                    <exclude>DEPENDENCIES</exclude>
                                    <exclude>NOTICE</exclude>
                                    <exclude>**/*.txt</exclude>
                                    <exclude>build.properties</exclude>
                                </excludes>
                            </filter>
                        </filters>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <index>true</index>
                            <manifestEntries>
                                <Specification-Title>${project.description}</Specification-Title>
                                <Specification-Version>${project.version}</Specification-Version>
                                <Implementation-Title>${project.groupId}.${project.artifactId}</Implementation-Title>
                                <Implementation-Version>${git.buildnumber}</Implementation-Version>
                                <X-Build-Timestamp>${timestamp}</X-Build-Timestamp>
                                <X-Git-Revision>${git.revision}</X-Git-Revision>
                                <X-Git-Branch>${git.branch}</X-Git-Branch>
                                <X-Git-Tag>${git.tag}</X-Git-Tag>
                                <X-Git-Commits-Count>${git.commitsCount}</X-Git-Commits-Count>
                            </manifestEntries>
                            <addMavenDescriptor>false</addMavenDescriptor>
                            <!-- Checking for timestamps will typically offer a performance gain
                                 (in particular, if the following steps in a build can be suppressed,
                                 if an archive isn't recreated) on the cost that you get inaccurate results
                                 from time to time. In particular, removal of source files won't be detected.
                            -->
                            <forced>false</forced>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <!-- produce source artifact for main project sources -->
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skipSource>${skipSourceGeneration}</skipSource>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>1.15</version>
                    <configuration>
                        <signature>
                            <groupId>org.codehaus.mojo.signature</groupId>
                            <artifactId>java16</artifactId>
                            <version>1.0</version>
                        </signature>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-java16</id>
                            <phase>test</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.3</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>${skipJavadocGeneration}</skip>
                        <failOnError>false</failOnError>
                        <detectLinks/>
                        <links>
                            <link>http://docs.oracle.com/javase/8/docs/api/</link>
                            <link>http://google.github.io/guava/releases/19.0/api/docs/</link>
                            <link>http://www.joda.org/joda-time/apidocs/</link>
                        </links>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                    <configuration>
                        <deployAtEnd>true</deployAtEnd>
                        <retryFailedDeploymentCount>3</retryFailedDeploymentCount>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.2</version>
                </plugin>
                <plugin>
                    <groupId>org.commonjava.maven.plugins</groupId>
                    <artifactId>directory-maven-plugin</artifactId>
                    <version>0.1</version>
                    <executions>
                        <execution>
                            <id>directories</id>
                            <goals>
                                <goal>highest-basedir</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <property>project.highest-basedir</property>
                                <!-- will be filled at runtime by the plugin -->
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>ru.concerteza.buildnumber</groupId>
                    <artifactId>maven-jgit-buildnumber-plugin</artifactId>
                    <version>1.2.10</version>
                    <executions>
                        <execution>
                            <phase>initialize</phase>
                            <id>git-buildnumber</id>
                            <goals>
                                <goal>extract-buildnumber</goal>
                            </goals>
                            <configuration>
                                <javaScriptBuildnumberCallback>
                                    (tag.length > 0) ? tag : branch + "-" + shortRevision + "-" + commitsCount
                                </javaScriptBuildnumberCallback>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                    <executions>
                        <execution>
                            <id>enforce-maven</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>[3.0.5,4)</version>
                                        <message>Check for Maven version &gt;=3.0.5 failed. Upgrade your Maven
                                            installation.
                                        </message>
                                    </requireMavenVersion>
                                    <requireEnvironmentVariable>
                                        <variableName>JAVA8_HOME</variableName>
                                    </requireEnvironmentVariable>
                                    <requireEnvironmentVariable>
                                        <variableName>JAVA7_HOME</variableName>
                                    </requireEnvironmentVariable>
                                    <DependencyConvergence/>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!-- Mandatory plugin for using Spock -->
                <plugin>
                    <groupId>org.codehaus.gmaven</groupId>
                    <artifactId>gmaven-plugin</artifactId>
                    <version>1.5</version>
                    <configuration>
                        <providerSelection>2.0</providerSelection>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>compile</goal>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.gmaven.runtime</groupId>
                            <artifactId>gmaven-runtime-2.0</artifactId>
                            <version>1.5</version>
                            <exclusions>
                                <exclusion>
                                    <groupId>org.codehaus.groovy</groupId>
                                    <artifactId>groovy-all</artifactId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                        <dependency>
                            <groupId>org.codehaus.groovy</groupId>
                            <artifactId>groovy-all</artifactId>
                            <version>${groovy-all.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.6.201602180812</version>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>prepare-agent-integration</id>
                            <goals>
                                <goal>prepare-agent-integration</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>merge</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>merge</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report-integration</id>
                            <goals>
                                <goal>report-integration</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>${skipCoverageTest}</skip>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>1.3.6</version>
                    <executions>
                        <execution>
                            <phase>test</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>aggregate</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>${skipDependencyTest}</skip>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.coverity</groupId>
                    <artifactId>ondemand-maven-plugin</artifactId>
                    <version>1.5.60</version>
                </plugin>

                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>4.1.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>net.orfjackal.retrolambda</groupId>
                <artifactId>retrolambda-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>ru.concerteza.buildnumber</groupId>
                <artifactId>maven-jgit-buildnumber-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.commonjava.maven.plugins</groupId>
                <artifactId>directory-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>animal-sniffer-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
            </plugin>
            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
            </plugin>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>build-test</id>
            <properties>
                <skipUnitTests>false</skipUnitTests>
                <skipIntegrationTests>false</skipIntegrationTests>
                <skipMutationTests>true</skipMutationTests>
                <skipCoverageTest>true</skipCoverageTest>
                <skipDependencyTest>true</skipDependencyTest>
                <skipSourceGeneration>true</skipSourceGeneration>
                <skipJavadocGeneration>true</skipJavadocGeneration>
            </properties>
        </profile>

        <profile>
            <id>build-release</id>
            <properties>
                <skipUnitTests>true</skipUnitTests>
                <skipIntegrationTests>true</skipIntegrationTests>
                <skipMutationTests>true</skipMutationTests>
                <skipCoverageTest>true</skipCoverageTest>
                <skipDependencyTest>true</skipDependencyTest>
                <skipSourceGeneration>false</skipSourceGeneration>
                <skipJavadocGeneration>false</skipJavadocGeneration>
            </properties>
        </profile>

        <profile>
            <id>skip-unit-tests</id>
            <properties>
                <skipUnitTests>true</skipUnitTests>
            </properties>
        </profile>

        <profile>
            <id>enable-unit-tests</id>
            <properties>
                <skipUnitTests>false</skipUnitTests>
            </properties>
        </profile>

        <profile>
            <id>enable-integration-tests</id>
            <properties>
                <skipIntegrationTests>false</skipIntegrationTests>
            </properties>
        </profile>

        <profile>
            <id>enable-mutation-tests</id>
            <properties>
                <skipMutationTests>false</skipMutationTests>
            </properties>
        </profile>

        <profile>
            <id>enable-coverage-tests</id>
            <properties>
                <skipCoverageTest>false</skipCoverageTest>
            </properties>
        </profile>

        <profile>
            <id>enable-dependency-tests</id>
            <properties>
                <skipDependencyTest>false</skipDependencyTest>
            </properties>
        </profile>

        <profile>
            <id>generate-source</id>
            <properties>
                <skipSourceGeneration>false</skipSourceGeneration>
            </properties>
        </profile>

        <profile>
            <id>generate-docs</id>
            <properties>
                <skipJavadocGeneration>false</skipJavadocGeneration>
            </properties>
        </profile>

        <profile>
            <id>travis</id>
            <activation>
                <property>
                    <name>env.TRAVIS</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>com.coverity</groupId>
                        <artifactId>ondemand-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.eluder.coveralls</groupId>
                        <artifactId>coveralls-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>report-pit</id>
            <activation>
                <file>
                    <exists>target/pit-reports</exists>
                </file>
            </activation>

            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-maven</artifactId>
                        <version>1.1.10</version>
                        <reportSets>
                            <reportSet>
                                <reports>
                                    <report>report</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                </plugins>
            </reporting>
        </profile>

    </profiles>

    <repositories>
        <repository>
            <id>jcenter</id>
            <name>Bintray JCenter</name>
            <url>http://jcenter.bintray.com</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>jcenter</id>
            <name>Bintray JCenter plugins</name>
            <url>http://jcenter.bintray.com</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</project>
