<?xml version="1.0" encoding="UTF-8"?>
<!--

    This is free and unencumbered software released into the public domain.

    Anyone is free to copy, modify, publish, use, compile, sell, or
    distribute this software, either in source code form or as a compiled
    binary, for any purpose, commercial or non-commercial, and by any
    means.

    In jurisdictions that recognize copyright laws, the author or authors
    of this software dedicate any and all copyright interest in the
    software to the public domain. We make this dedication for the benefit
    of the public at large and to the detriment of our heirs and
    successors. We intend this dedication to be an overt act of
    relinquishment in perpetuity of all present and future rights to this
    software under copyright law.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
    OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.

    For more information, please refer to <http://unlicense.org>

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

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                 PARENT                                  -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <parent>
    <groupId>com.github.sebhoss</groupId>
    <artifactId>superpom</artifactId>
    <version>3.0.1</version>
  </parent>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                               INFORMATIONS                              -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <artifactId>java-parent</artifactId>
  <version>2.0.2</version>
  <packaging>pom</packaging>
  <inceptionYear>2013</inceptionYear>
  <url>https://github.com/sebhoss/java-parent</url>
  <name>Java Parent</name>
  <description>Parent POM for all Java-based projects</description>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                  SOURCE                                 -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <scm>
    <connection>scm:git:git://github.com/sebhoss/java-parent.git</connection>
    <developerConnection>scm:git:git@github.com:sebhoss/java-parent.git</developerConnection>
    <tag>master</tag>
    <url>${project.url}</url>
  </scm>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                PROPERTIES                               -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <properties>
    <version.jdk>1.8</version.jdk>

    <jacoco.lineCoverage>1.00000</jacoco.lineCoverage>
    <pit.mutationCoverage>100</pit.mutationCoverage>
    <pit.threads>8</pit.threads>
    <pmd.minimumTokens>50</pmd.minimumTokens>
    <pmd.failurePriority>0</pmd.failurePriority>
    <findbugs.effort>Max</findbugs.effort>
    <findbugs.threshold>Low</findbugs.threshold>
    <failBuildOnDuplicates>true</failBuildOnDuplicates>
    <failBuildOnDependencyVersionProblem>true</failBuildOnDependencyVersionProblem>
    <failBuildOnDependencyProblem>true</failBuildOnDependencyProblem>

    <version.m-pmd-p>3.5</version.m-pmd-p>
    <version.m-javadoc-p>2.10.3</version.m-javadoc-p>
    <version.m-dependency-p>2.10</version.m-dependency-p>
    <version.m-dependency-versions-check-p>2.0.2</version.m-dependency-versions-check-p>
    <version.m-remote-resources-p>1.5</version.m-remote-resources-p>
    <version.m-bundle-p>2.5.4</version.m-bundle-p>
    <version.m-jar-p>2.6</version.m-jar-p>
    <version.m-compiler-p>3.3</version.m-compiler-p>
    <version.m-source-p>2.4</version.m-source-p>
    <version.findbugs-m-p>3.0.1</version.findbugs-m-p>
    <version.pittest-m-p>1.1.7</version.pittest-m-p>
    <version.duplicate-finder-m-p>1.2.0</version.duplicate-finder-m-p>
    <version.coveralls-m-p>3.1.0</version.coveralls-m-p>
    <version.jacoco-m-p>0.7.5.201505241946</version.jacoco-m-p>
    <version.m-surefire-report-p>2.18.1</version.m-surefire-report-p>

    <version.tycho-compiler-jdt>0.24.0</version.tycho-compiler-jdt>
    <version.jdt-settings>2.0.0</version.jdt-settings>
  </properties>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                   BUILD                                 -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${version.m-source-p}</version>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${version.m-javadoc-p}</version>
        <configuration>
          <outputDirectory>${project.build.directory}/api</outputDirectory>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.m-compiler-p}</version>
        <configuration>
          <source>${version.jdk}</source>
          <target>${version.jdk}</target>
          <compilerId>jdt</compilerId>
          <compilerArguments>
            <properties>${project.basedir}/.settings/org.eclipse.jdt.core.prefs</properties>
          </compilerArguments>
          <compilerArgument>-parameters</compilerArgument>
        </configuration>
        <dependencies>
          <!-- This dependency provides the implementation of compiler "jdt": -->
          <dependency>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-compiler-jdt</artifactId>
            <version>${version.tycho-compiler-jdt}</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${version.m-jar-p}</version>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${version.m-bundle-p}</version>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <instructions>
            <Bundle-Copyright>${project.developers[0].name} (${project.developers[0].email})</Bundle-Copyright>
            <Bundle-DocURL>${project.url}</Bundle-DocURL>
          </instructions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${version.findbugs-m-p}</version>
        <configuration>
          <effort>${findbugs.effort}</effort>
          <threshold>${findbugs.threshold}</threshold>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${version.m-pmd-p}</version>
        <configuration>
          <failurePriority>${pmd.failurePriority}</failurePriority>
          <minimumTokens>${pmd.minimumTokens}</minimumTokens>
          <targetJdk>${version.jdk}</targetJdk>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
              <goal>cpd-check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${version.jacoco-m-p}</version>
        <executions>
          <execution>
            <id>prepare-coverage-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>check-coverage</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>CLASS</element>
                  <excludes>
                    <exclude>*Test</exclude>
                  </excludes>
                  <limits>
                    <limit>
                      <counter>LINE</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>${jacoco.lineCoverage}</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>${version.coveralls-m-p}</version>
        <configuration>
          <repoToken>${COVERALLS_TOKEN}</repoToken>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>${version.m-remote-resources-p}</version>
        <executions>
          <execution>
            <id>jdt-settings</id>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <attachToMain>false</attachToMain>
              <attachToTest>false</attachToTest>
              <resourceBundles>
                <resourceBundle>com.github.sebhoss:jdt-settings:${version.jdt-settings}</resourceBundle>
              </resourceBundles>
              <outputDirectory>${project.basedir}/.settings</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.basepom.maven</groupId>
        <artifactId>duplicate-finder-maven-plugin</artifactId>
        <version>${version.duplicate-finder-m-p}</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <failBuildInCaseOfConflict>${failBuildOnDuplicates}</failBuildInCaseOfConflict>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.ning.maven.plugins</groupId>
        <artifactId>maven-dependency-versions-check-plugin</artifactId>
        <version>${version.m-dependency-versions-check-p}</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <failBuildInCaseOfConflict>${failBuildOnDependencyVersionProblem}</failBuildInCaseOfConflict>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>${version.m-dependency-p}</version>
        <executions>
          <execution>
            <goals>
              <goal>analyze-only</goal>
              <goal>analyze-duplicate</goal>
              <goal>analyze-dep-mgt</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <failOnWarning>${failBuildOnDependencyProblem}</failOnWarning>
          <ignoredDependencies>
            <ignoredDependency>com.github.sebhoss:suppress-warnings</ignoredDependency>
          </ignoredDependencies>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-maven</artifactId>
        <version>${version.pittest-m-p}</version>
        <configuration>
          <threads>${pit.threads}</threads>
          <mutationThreshold>${pit.mutationCoverage}</mutationThreshold>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>mutationCoverage</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                 REPORTING                               -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${version.m-surefire-report-p}</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${version.m-pmd-p}</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${version.m-javadoc-p}</version>
        <configuration>
          <outputDirectory>${project.build.directory}/api</outputDirectory>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${version.findbugs-m-p}</version>
      </plugin>
    </plugins>
  </reporting>
</project>
