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

    This file is part of maven-build-process. It is subject to the license terms in the LICENSE file found in the top-level
    directory of this distribution and at http://creativecommons.org/publicdomain/zero/1.0/. No part of maven-build-process,
    including this file, may be copied, modified, propagated, or distributed except according to the terms contained
    in the LICENSE file.

-->
<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>

  <!-- ordering follows https://maven.apache.org/developers/conventions/code.html#POM_Code_Convention -->

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                 PARENT                                  -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- https://maven.apache.org/pom.html#Inheritance -->
  <parent>
    <groupId>de.xn--ho-hia.maven.parents</groupId>
    <artifactId>maven-parents</artifactId>
    <version>2016.06.19-211242</version>
  </parent>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                               COORDINATES                               -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- https://maven.apache.org/pom.html#Maven_Coordinates -->
  <artifactId>maven-parents-java</artifactId>
  <packaging>pom</packaging>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                               INFORMATIONS                              -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- https://maven.apache.org/pom.html#More_Project_Information -->
  <name>Maven Parents :: Java</name>
  <description>Base Java parent POM</description>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                 MODULES                                 -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- https://maven.apache.org/pom.html#Aggregation -->
  <modules>
    <module>maven-parents-java-prototype</module>
    <module>maven-parents-java-stable</module>
  </modules>

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

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

    <version.m-pmd-p>3.6</version.m-pmd-p>
    <version.m-javadoc-p>2.10.4</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-jar-p>3.0.1</version.m-jar-p>
    <version.m-compiler-p>3.5.1</version.m-compiler-p>
    <version.m-source-p>3.0.0</version.m-source-p>
    <version.bnd-m-p>3.2.0</version.bnd-m-p>
    <version.findbugs-m-p>3.0.3</version.findbugs-m-p>
    <version.pittest-m-p>1.1.10</version.pittest-m-p>
    <version.duplicate-finder-m-p>1.2.1</version.duplicate-finder-m-p>
    <version.coveralls-m-p>4.1.0</version.coveralls-m-p>
    <version.jacoco-m-p>0.7.7.201606060606</version.jacoco-m-p>
    <version.m-surefire-report-p>2.19.1</version.m-surefire-report-p>
    <version.dependency-check-m>1.4.0</version.dependency-check-m>
    <version.m-dependency-p>2.10</version.m-dependency-p>

    <version.tycho-compiler-jdt>0.25.0</version.tycho-compiler-jdt>
  </properties>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                            DEPENDENCY MANAGEMENT                        -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- https://maven.apache.org/pom.html#Dependency_Management -->
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>de.xn--ho-hia.maven.boms</groupId>
        <artifactId>maven-boms-all</artifactId>
        <version>2016.06.19-211242</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                DEPENDENCIES                             -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- https://maven.apache.org/pom.html#Dependencies -->
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jdt</groupId>
      <artifactId>org.eclipse.jdt.annotation</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

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

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

        <plugin>
          <!-- https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/README.md -->
          <groupId>biz.aQute.bnd</groupId>
          <artifactId>bnd-maven-plugin</artifactId>
          <version>${version.bnd-m-p}</version>
          <executions>
            <execution>
              <goals>
                <goal>bnd-process</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <!-- https://maven.apache.org/plugins/maven-compiler-plugin/ -->
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${version.m-compiler-p}</version>
          <configuration>
            <!-- https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source -->
            <source>${version.jdk}</source>
            <!-- https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#target -->
            <target>${version.jdk}</target>
            <!-- https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerId -->
            <compilerId>jdt</compilerId>
            <!-- https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerArguments -->
            <compilerArguments>
              <!-- https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javac.html -->
              <parameters />
              <!-- https://wiki.eclipse.org/Tycho/FAQ#How_to_configure_warning.2Ferror_settings_of_the_OSGi_compiler.3F -->
              <properties>${project.basedir}/.settings/org.eclipse.jdt.core.prefs</properties>
            </compilerArguments>
          </configuration>
          <dependencies>
            <!-- This dependency provides the implementation of compiler "jdt" -->
            <dependency>
              <!-- https://eclipse.org/tycho/sitedocs/ -->
              <groupId>org.eclipse.tycho</groupId>
              <artifactId>tycho-compiler-jdt</artifactId>
              <version>${version.tycho-compiler-jdt}</version>
            </dependency>
          </dependencies>
        </plugin>

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

        <plugin>
          <!-- http://gleclaire.github.io/findbugs-maven-plugin/ -->
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>${version.findbugs-m-p}</version>
          <configuration>
            <!-- http://gleclaire.github.io/findbugs-maven-plugin/check-mojo.html#effort -->
            <effort>${findbugs.effort}</effort>
            <!-- http://gleclaire.github.io/findbugs-maven-plugin/check-mojo.html#threshold -->
            <threshold>${findbugs.threshold}</threshold>
            <!-- http://gleclaire.github.io/findbugs-maven-plugin/check-mojo.html#skip -->
            <skip>${findbugs.skip}</skip>
          </configuration>
          <executions>
            <execution>
              <goals>
                <!-- http://gleclaire.github.io/findbugs-maven-plugin/check-mojo.html -->
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

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

        <plugin>
          <!-- http://eclemma.org/jacoco/trunk/doc/maven.html -->
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${version.jacoco-m-p}</version>
          <configuration>
            <skip>${jacoco.skip}</skip>
          </configuration>
          <executions>
            <execution>
              <id>prepare-coverage-agent</id>
              <goals>
                <!-- http://eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html -->
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>check-coverage</id>
              <goals>
                <!-- http://eclemma.org/jacoco/trunk/doc/check-mojo.html -->
                <goal>check</goal>
              </goals>
              <configuration>
                <!-- http://eclemma.org/jacoco/trunk/doc/check-mojo.html#rules -->
                <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>
          <!-- https://maven.apache.org/plugins/maven-remote-resources-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>
                <!-- https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo.html -->
                <goal>process</goal>
              </goals>
              <configuration>
                <!-- https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo.html#attachToMain -->
                <attachToMain>false</attachToMain>
                <!-- https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo.html#attachToTest -->
                <attachToTest>false</attachToTest>
                <!-- https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo.html#resourceBundles -->
                <resourceBundles>
                  <resourceBundle>com.github.sebhoss:jdt-settings:2.0.0</resourceBundle>
                </resourceBundles>
                <!-- https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo.html#outputDirectory -->
                <outputDirectory>${project.basedir}/.settings</outputDirectory>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <!-- http://pitest.org/quickstart/maven/ -->
          <groupId>org.pitest</groupId>
          <artifactId>pitest-maven</artifactId>
          <version>${version.pittest-m-p}</version>
          <configuration>
            <!-- http://pitest.org/quickstart/maven/#threads -->
            <threads>${pit.threads}</threads>
            <!-- http://pitest.org/quickstart/maven/#mutationthreshold -->
            <mutationThreshold>${pit.mutationCoverage}</mutationThreshold>
            <!-- http://pitest.org/quickstart/maven/#skip -->
            <skip>${pit.skip}</skip>
            <!-- http://pitest.org/quickstart/maven/#targetclasses -->
            <targetClasses>
              <param>de.xn__ho_hia*</param>
            </targetClasses>
            <!-- http://pitest.org/quickstart/maven/#targettests -->
            <targetTests>
              <param>de.xn__ho_hia*</param>
            </targetTests>
            <outputFormats>
              <outputFormat>XML</outputFormat>  
            </outputFormats>
          </configuration>
          <executions>
            <execution>
              <goals>
                <!-- http://pitest.org/quickstart/maven/#mutationcoverage-goal -->
                <goal>mutationCoverage</goal>
              </goals>
              <phase>verify</phase>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <!-- https://jeremylong.github.io/DependencyCheck/dependency-check-maven/index.html -->
          <groupId>org.owasp</groupId>
          <artifactId>dependency-check-maven</artifactId>
          <version>${version.dependency-check-m}</version>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <!-- https://maven.apache.org/plugins/maven-dependency-plugin/ -->
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${version.m-dependency-p}</version>
          <executions>
            <execution>
              <goals>
                <!-- https://maven.apache.org/plugins/maven-dependency-plugin/analyze-only-mojo.html -->
                <goal>analyze-only</goal>
                <!-- https://maven.apache.org/plugins/maven-dependency-plugin/analyze-duplicate-mojo.html -->
                <goal>analyze-duplicate</goal>
                <!-- https://maven.apache.org/plugins/maven-dependency-plugin/analyze-dep-mgt-mojo.html -->
                <goal>analyze-dep-mgt</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <!-- https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html#failOnWarning -->
            <failOnWarning>${failBuildOnDependencyProblem}</failOnWarning>
            <!-- https://maven.apache.org/plugins/maven-dependency-plugin/analyze-only-mojo.html#usedDependencies -->
            <usedDependencies>
              <!--
                Ignore Eclipse JDT annotations because @NonNull, etc are not retained
                in byte code. Therefore the plugin detects a false positive.
               -->
              <usedDependency>org.eclipse.jdt:org.eclipse.jdt.annotation</usedDependency>
            </usedDependencies>
            <!-- https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html#ignoredDependencies -->
            <ignoredDependencies>
              <ignoredDependency>com.github.sebhoss:suppress-warnings</ignoredDependency>
            </ignoredDependencies>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <!-- https://maven.apache.org/pom.html#Plugins -->
    <plugins>
      <plugin>
        <!-- https://maven.apache.org/plugins/maven-remote-resources-plugin/ -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
      </plugin>
      <plugin>
        <!-- https://maven.apache.org/plugins/maven-compiler-plugin/ -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <!-- https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/README.md -->
        <groupId>biz.aQute.bnd</groupId>
        <artifactId>bnd-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <!-- https://maven.apache.org/plugins/maven-jar-plugin/ -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--                                 PROFILES                                -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- https://maven.apache.org/pom.html#Profiles -->
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <!-- https://maven.apache.org/plugins/maven-source-plugin/ -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <!-- https://maven.apache.org/plugins/maven-javadoc-plugin/ -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <!-- https://maven.apache.org/plugins/maven-gpg-plugin/ -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
