<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    Copyright (C) 2016 Gary Gregory. All rights reserved.

    See the NOTICE.txt file distributed with this work for additional
    information regarding copyright ownership.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.garygregory</groupId>
  <artifactId>garygregory-parent</artifactId>
  <version>1.1.0</version>
  <packaging>pom</packaging>

  <name>garygregory-parent</name>
  <url>https://github.com/garydgregory/garygregory-parent</url>
  <inceptionYear>2016</inceptionYear>

  <description>The GG Parent POM provides common settings for all GG projects.</description>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>

    <gg-ReleaseVersion>1.1.0</gg-ReleaseVersion>
    <gg-ReleaseManager>Gary Gregory</gg-ReleaseManager>
    <gg-Copyright>Copyright &#169; ${project.inceptionYear}-{currentYear} {organizationName}. All Rights Reserved.</gg-Copyright>
    <gg-GitHubUser>garydgregory</gg-GitHubUser>
    <gg-LicenseName>The Apache Software License, Version 2.0</gg-LicenseName>
    <gg-LicenseUrl>http://www.apache.org/licenses/LICENSE-2.0.txt</gg-LicenseUrl>
    <gg-AmazonrUrl>https://www.amazon.com/author/garygregory/</gg-AmazonrUrl>
    <gg-LinkedInUrl>https://www.linkedin.com/in/garydgregory/</gg-LinkedInUrl>
    <gg-BlogUrl>https://garygregory.wordpress.com</gg-BlogUrl>
    <gg-GitHubUrl>https://github.com/garydgregory</gg-GitHubUrl>
    <gg-ApacheUrl>https://people.apache.org/~ggregory/</gg-ApacheUrl>
  </properties>

  <scm>
    <connection>scm:git:${project.url}</connection>
    <developerConnection>scm:git:${project.url}.git</developerConnection>
    <url>${project.url}</url>
    <tag>${project.artifactId}-${gg-ReleaseVersion}</tag>
  </scm>

  <developers>
    <developer>
      <id>garygregory</id>
      <name>Gary Gregory</name>
      <email>garydgregory@gmail.com</email>
      <organization>Gary Gregory</organization>
      <roles>
        <role>Founder</role>
      </roles>
      <timezone>America/Los_Angeles</timezone>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>${gg-LicenseName}</name>
      <url>${gg-LicenseUrl}</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <issueManagement>
    <system>GitHub</system>
    <url>${project.url}/issues</url>
  </issueManagement>

  <distributionManagement>
    <repository>
      <id>sonatype.staging</id>
      <name>Sonatype Release Staging Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>sonatype.snapshots</id>
      <name>Sonatype Development Snapshot Repository</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <exclusions>
          <exclusion>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
      </dependency>
      <dependency>
        <groupId>com.beust</groupId>
        <artifactId>jcommander</artifactId>
        <version>1.48</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.3</version>
        </plugin>      
	    <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <useReleaseProfile>false</useReleaseProfile>
            <goals>deploy</goals>
            <arguments>-Papache-release ${arguments}</arguments>
            <waitBeforeTagging>10</waitBeforeTagging>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>	  
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>	  
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.12</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.0</version>
          <configuration>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.19.1</version>
        </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-javadoc-plugin</artifactId>
          <version>2.10.4</version>
          <configuration>
            <keywords>true</keywords>
            <overview>src/main/java/overview.html</overview>
            <linksource>true</linksource>
            <header><![CDATA[<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?skin=sunburst"></script>]]></header>
            <bottom><![CDATA[<p align="center">${gg-Copyright}<br />Use is subject to <a href="${gg-LicenseUrl}">${gg-LicenseName}</a></p>]]></bottom>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.7</version>
          <configuration>
            <linkXref>true</linkXref>
            <skipEmptyReport>false</skipEmptyReport>
            <targetJdk>${maven.compiler.target}</targetJdk>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>3.0.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.5.1</version>
          <executions>
            <execution>
              <id>attach-descriptor</id>
              <goals>
                <goal>attach-descriptor</goal>
              </goals>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.doxia</groupId>
              <artifactId>doxia-module-markdown</artifactId>
              <version>1.7</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>taglist-maven-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <tagListOptions>
              <tagClasses>
                <tagClass>
                  <displayName>Help Wanted</displayName>
                  <tags>
                    <tag>
                      <matchString>TODO</matchString>
                      <matchType>ignoreCase</matchType>
                    </tag>
                    <tag>
                      <matchString>FIXME</matchString>
                      <matchType>ignoreCase</matchType>
                    </tag>
                  </tags>
                </tagClass>
              </tagClasses>
            </tagListOptions>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.7</version>
          <configuration>
            <format>xml</format>
            <maxmem>256m</maxmem>
            <!-- aggregated reports for multi-module projects -->
            <aggregate>true</aggregate>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.eluder.coveralls</groupId>
          <artifactId>coveralls-maven-plugin</artifactId>
          <version>4.3.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>javancss-maven-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jdepend-maven-plugin</artifactId>
          <version>2.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-changes-plugin</artifactId>
          <version>2.12.1</version>
        </plugin>        
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <consoleOutput>true</consoleOutput>
          <excludes>
            <!-- GitHub Pages site -->
            <exclude>docs/**</exclude>
            <!-- Javadoc -->
            <exclude>**/package-info.java</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javancss-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.12.1</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>            
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>summary</report>
              <report>license</report>
              <report>modules</report>
              <report>project-team</report>
              <report>scm</report>
              <report>issue-tracking</report>
              <report>mailing-list</report>
              <report>dependency-info</report>
              <report>dependency-management</report>
              <report>dependencies</report>
              <report>dependency-convergence</report>
              <report>cim</report>
              <report>distribution-management</report>
<!--          <report>plugin-management</report>      not very useful for end users -->
<!--          <report>plugins</report>                not very useful for end users -->
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <organization>
    <name>Gary Gregory</name>
    <url>http://garygregory.com/</url>
  </organization>
  
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- We want to sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-install-plugin</artifactId>
            <configuration>
              <createChecksum>true</createChecksum>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>create-source-jar</id>
                <goals>
                  <goal>jar</goal>
                  <goal>test-jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>test-jar</goal>
                </goals>
                <configuration>
                  <!-- Avoids an error when releasing the parent pom -->
                  <skipIfEmpty>true</skipIfEmpty>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <!-- Pass these arguments to the deploy plugin. -->
              <arguments>-Prelease</arguments>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>create-javadoc-jar</id>
                <goals>
                  <goal>javadoc</goal>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
            <configuration>
              <source>${maven.compiler.source}</source>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
