<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>au.com.acegi</groupId>
  <artifactId>acegi-standard-project</artifactId>
  <version>0.1.6</version>
  <packaging>pom</packaging>
  <name>Acegi Standard Project</name>
  <description>Conventions and configurations to simplify the long-term development of Java projects.</description>
  <url>https://github.com/${github.org}/${github.repo}</url>
  <inceptionYear>2016</inceptionYear>
  <organization>
    <name>Acegi Technology Pty Limited</name>
    <url>https://github.com/${github.org}</url>
  </organization>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Ben Alex</name>
      <id>benalexau</id>
      <email>ben.alex@acegi.com.au</email>
      <url>https://github.com/benalexau/</url>
      <organization>Acegi Technology Pty Limited</organization>
      <timezone>+10</timezone>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:${github.org}/${github.repo}.git</connection>
    <developerConnection>scm:git:git@github.com:${github.org}/${github.repo}.git</developerConnection>
    <url>git@github.com:${github.org}/${github.repo}.git</url>
    <tag>acegi-standard-project-0.1.6</tag>
  </scm>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
  <properties>
    <acegi.standard.resources.version>0.1.6</acegi.standard.resources.version>
    <github.global.server>github</github.global.server>
    <github.org>acegi</github.org>
    <github.repo>acegi-standard-project</github.repo>
    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.enforcer.java>1.8</maven.enforcer.java>
    <maven.enforcer.mvn>3.5.2</maven.enforcer.mvn>
    <pmd.ruleset>/au/com/acegi/standard/rule-set-pmd.xml</pmd.ruleset>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <trimStackTrace>false</trimStackTrace>
  </properties>
  <modules>
    <module>resources</module>
    <module>test</module>
  </modules>
  <dependencyManagement>
    <!-- Common dependencies compatible with POM's build quality plugins-->
    <dependencies>
      <!-- Static analysis -->
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>annotations</artifactId>
        <version>3.0.1u2</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>3.0.2</version>
        <scope>provided</scope>
      </dependency>
      <!-- Testing -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-library</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>2.13.0</version>
        <scope>test</scope>
      </dependency>
      <!-- Plugin development -->
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>3.5.2</version>
        <exclusions>
          <exclusion>
            <groupId>org.eclipse.sisu</groupId>
            <artifactId>org.eclipse.sisu.plexus</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>3.5</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <!-- Plugins configured so end users can use without extra config -->
        <!-- Official Maven plugins with default configuration -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.7.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <artifactId>maven-jdeps-plugin</artifactId>
          <version>3.1.0</version>
          <executions>
            <execution>
              <goals>
                <goal>jdkinternals</goal>
                <goal>test-jdkinternals</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- Official Maven plugins with non-default configuration -->
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <Implementation-Build>${buildNumber}</Implementation-Build>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <completionGoals>clean verify</completionGoals>
            <preparationGoals>clean verify</preparationGoals>
            <useReleaseProfile>false</useReleaseProfile>
            <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
        </plugin>
        <plugin>
          <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>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.0.0</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.0.0-M1</version>
          <executions>
            <execution>
              <id>config-enforcer</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <dependencyConvergence/>
                  <requireMavenVersion>
                    <version>[${maven.enforcer.mvn},)</version>
                  </requireMavenVersion>
                  <requireJavaVersion>
                    <version>[${maven.enforcer.java},)</version>
                  </requireJavaVersion>
                  <requireNoRepositories/>
                  <requirePluginVersions/>
                  <requireReleaseDeps>
                    <onlyWhenRelease>true</onlyWhenRelease>
                  </requireReleaseDeps>
                  <requireUpperBoundDeps/>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.0.2</version>
          <executions>
            <execution>
              <id>config-dependency</id>
              <goals>
                <goal>analyze-only</goal>
              </goals>
              <configuration>
                <!-- Pending https://issues.apache.org/jira/browse/MDEP-559 (Java 9) -->
                <failOnWarning>true</failOnWarning>
              </configuration>
            </execution>
            <execution>
              <!-- Needed due to https://github.com/mojohaus/versions-maven-plugin/issues/97 and https://github.com/checkstyle/checkstyle/issues/62, but also potentially useful for easy IDE plugin access to resource files -->
              <id>maven-dependency-unpack</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>unpack</goal>
              </goals>
              <configuration>
                <artifactItems>
                  <artifactItem>
                    <groupId>au.com.acegi</groupId>
                    <artifactId>acegi-standard-resources</artifactId>
                    <version>${acegi.standard.resources.version}</version>
                    <overWrite>false</overWrite>
                    <outputDirectory>${project.build.directory}/acegi-standard-resources</outputDirectory>
                  </artifactItem>
                </artifactItems>
                <includes>**/*.xml</includes>
                <silent>true</silent>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.17</version>
          <executions>
            <execution>
              <id>config-checkstyle</id>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <!-- user can override with <checkstyle.config.location> property -->
                <configLocation>/au/com/acegi/standard/checkstyle.xml</configLocation>
                <suppressionsLocation>/au/com/acegi/standard/checkstyle-suppressions.xml</suppressionsLocation>
                <consoleOutput>true</consoleOutput>
                <failsOnError>true</failsOnError>
                <includeTestSourceDirectory>true</includeTestSourceDirectory>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>au.com.acegi</groupId>
              <artifactId>acegi-standard-resources</artifactId>
              <version>${acegi.standard.resources.version}</version>
            </dependency>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>8.5</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.8</version>
          <executions>
            <execution>
              <id>config-pmd</id>
              <goals>
                <goal>check</goal>
                <goal>cpd</goal>
                <goal>cpd-check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <outputDirectory>${project.build.directory}/pmd/html</outputDirectory>
            <targetDirectory>${project.build.directory}/pmd/xml</targetDirectory>
            <excludeRoots>
              <excludeRoot>${project.build.directory}/generated-sources/java</excludeRoot>
              <excludeRoot>${project.build.directory}/generated-sources/annotations</excludeRoot>
              <excludeRoot>${project.build.directory}/generated-test-sources/java</excludeRoot>
              <excludeRoot>${project.build.directory}/generated-test-sources/annotations</excludeRoot>
            </excludeRoots>
            <printFailingErrors>true</printFailingErrors>
            <includeTests>true</includeTests>
            <rulesets>
              <ruleset>${pmd.ruleset}</ruleset>
            </rulesets>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>au.com.acegi</groupId>
              <artifactId>acegi-standard-resources</artifactId>
              <version>${acegi.standard.resources.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>3.5</version>
          <executions>
            <execution>
              <id>default-descriptor</id>
              <phase>process-classes</phase>
              <goals>
                <goal>descriptor</goal>
              </goals>
            </execution>
            <execution>
              <id>generated-helpmojo</id>
              <goals>
                <goal>helpmojo</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.6</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.doxia</groupId>
              <artifactId>doxia-module-markdown</artifactId>
              <version>1.8</version>
            </dependency>
          </dependencies>
          <configuration>
            <skipDeploy>true</skipDeploy>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.8</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>
        <!-- Third party plugins: Maven services -->
        <plugin>
          <groupId>org.basepom.maven</groupId>
          <artifactId>duplicate-finder-maven-plugin</artifactId>
          <version>1.2.1</version>
          <executions>
            <execution>
              <id>config-duplicate-finder</id>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <printEqualFiles>true</printEqualFiles>
                <failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
                <failBuildInCaseOfEqualContentConflict>true</failBuildInCaseOfEqualContentConflict>
                <failBuildInCaseOfConflict>true</failBuildInCaseOfConflict>
                <ignoredResourcePatterns>
                  <ignoredResourcePattern>LICENSE.*</ignoredResourcePattern>
                  <ignoredResourcePattern>THIRD-PARTY.*</ignoredResourcePattern>
                  <ignoredResourcePattern>.netbeans_automatic_build</ignoredResourcePattern>
                  <ignoredResourcePattern>.*\.html</ignoredResourcePattern>
                </ignoredResourcePatterns>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.5</version>
          <executions>
            <execution>
              <id>config-versions</id>
              <phase>verify</phase>
              <goals>
                <goal>display-plugin-updates</goal>
                <goal>display-parent-updates</goal>
                <goal>display-property-updates</goal>
                <goal>display-dependency-updates</goal>
              </goals>
              <configuration>
                <!-- user can override with <maven.version.rules> property -->
                <rulesUri>file://${project.basedir}/target/acegi-standard-resources/au/com/acegi/standard/rule-set-ver.xml</rulesUri>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>au.com.acegi</groupId>
              <artifactId>acegi-standard-resources</artifactId>
              <version>${acegi.standard.resources.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>1.4</version>
          <executions>
            <execution>
              <phase>initialize</phase>
              <goals>
                <goal>create</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <doCheck>false</doCheck>
            <doUpdate>false</doUpdate>
            <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
            <shortRevisionLength>7</shortRevisionLength>
          </configuration>
        </plugin>
        <!-- Third party plugins: Java source -->
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.7.9</version>
          <executions>
            <execution>
              <id>config-jacoco-prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>config-jacoco-report</id>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>3.1.1</version>
          <executions>
            <execution>
              <id>config-spotbugs</id>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <excludeFilterFile>${project.build.directory}/acegi-standard-resources/au/com/acegi/standard/spotbugs-filter.xml</excludeFilterFile>
            <includeTests>true</includeTests>
          </configuration>
        </plugin>
        <!-- Third party plugins: other -->
        <plugin>
          <groupId>au.com.acegi</groupId>
          <artifactId>xml-format-maven-plugin</artifactId>
          <version>3.0.6</version>
          <executions>
            <execution>
              <id>config-xml-format</id>
              <goals>
                <goal>xml-format</goal>
              </goals>
              <configuration>
                <indentSize>2</indentSize>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>1.14</version>
          <executions>
            <execution>
              <id>config-license-project-update-license</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>update-project-license</goal>
              </goals>
              <configuration>
                <generateBundle>true</generateBundle>
              </configuration>
            </execution>
            <execution>
              <id>config-license-add-third-party</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-third-party</goal>
              </goals>
              <configuration>
                <failIfWarning>true</failIfWarning>
                <generateBundle>true</generateBundle>
              </configuration>
            </execution>
            <execution>
              <id>config-license-update-file-header</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>update-file-header</goal>
              </goals>
              <configuration>
                <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                <canUpdateCopyright>true</canUpdateCopyright>
                <canUpdateDescription>true</canUpdateDescription>
                <canUpdateLicense>true</canUpdateLicense>
                <emptyLineAfterHeader>true</emptyLineAfterHeader>
              </configuration>
            </execution>
          </executions>
          <configuration>
            <licenseResolver>classpath://au/com/acegi/standard/licenses</licenseResolver>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>au.com.acegi</groupId>
              <artifactId>acegi-standard-resources</artifactId>
              <version>${acegi.standard.resources.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <reporting>
    <!-- has no impact unless "mvn site" used (typically only for packaging=maven-plugin artifacts) -->
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependency-updates-report</report>
              <report>plugin-updates-report</report>
              <report>property-updates-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>cim</report>
              <report>dependencies</report>
              <report>distribution-management</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>scm</report>
              <report>summary</report>
              <report>project-team</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  <profiles>
    <profile>
      <id>acegi-standard-project-build-xml-format</id>
      <activation>
        <file>
          <exists>format-xml</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>au.com.acegi</groupId>
            <artifactId>xml-format-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release-tag</id>
    </profile>
    <profile>
      <id>deploy</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <!-- has no impact unless "mvn site" used (typically only for packaging=maven-plugin artifacts) -->
            <artifactId>maven-site-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>github-site</id>
      <activation>
        <property>
          <name>env.GITHUB_PASSWORD</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <!-- has no impact unless "mvn site-deploy" used (typically only for packaging=maven-plugin artifacts) -->
            <!-- the full site-maven-plugin is configured here as it has non-Central dependency that makes it problematic via mvn dependency:go-offline; see https://github.com/github/maven-plugins/issues/74 -->
            <!-- if this profile is enabled, users can still use "mvn -DexcludeGroupIds=com.github.github dependency:go-offline" -->
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <version>0.12</version>
            <executions>
              <execution>
                <phase>site-deploy</phase>
                <goals>
                  <goal>site</goal>
                </goals>
                <configuration>
                  <message>Building site for ${project.version}</message>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
