<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2017 RedEngine Ltd, http://www.redengine.co.nz. All rights reserved. -->
<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>net.stickycode.parent</groupId>
  <artifactId>sticky-parent-distribution8</artifactId>
  <version>2.3</version>
  <packaging>pom</packaging>

  <name>sticky-parent-distrbution-2</name>
  <description>Define the distribution management and general plugins used in all StickySource projects</description>
  <inceptionYear>2010</inceptionYear>
  <url>http://www.StickyCode.net/parent/sticky-distribution8/</url>

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

  <distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <name>Sticky Releases</name>
      <id>sticky-maven-upload</id>
      <url>https://repository.stickysource.com/repository/sticky-maven-upload</url>
    </repository>
  </distributionManagement>

  <organization>
    <name>RedEngine Ltd</name>
    <url>http://www.RedEngine.co.nz/</url>
  </organization>

  <developers>
    <developer>
      <email>michael@StickyCode.net</email>
      <id>michael@StickyCode.net</id>
      <name>Michael McCallum</name>
      <roles>
        <role>founder</role>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <organization>Red Engine Ltd</organization>
      <organizationUrl>http://www.RedEngine.co.nz</organizationUrl>
      <timezone>+12</timezone>
    </developer>
    <developer>
      <email>arwen@RedEngine.co.nz</email>
      <id>arwen</id>
      <name>Arwen Kencalo</name>
      <roles>
        <role>founder</role>
        <role>designer</role>
      </roles>
      <organization>Red Engine Ltd</organization>
      <organizationUrl>http://www.RedEngine.co.nz</organizationUrl>
      <timezone>+12</timezone>
    </developer>
  </developers>

  <scm>
    <connection>${git.url}</connection>
    <developerConnection>${git.url}</developerConnection>
    <tag>sticky-parent-distribution8-2.3</tag>
    <url>${git.url}</url>
  </scm>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <git.base.url>scm:git:git@github.com</git.base.url>
    <git.branchout.name>StickySource</git.branchout.name>
    <git.url>${git.base.url}:${git.branchout.name}/${project.artifactId}.git</git.url>
    <project.build.sourceEncoding>US-ASCII</project.build.sourceEncoding>
    <target.dir>target</target.dir>
    <output.basedir>${basedir}</output.basedir>
  </properties>

  <build>
    <directory>${output.basedir}/${target.dir}</directory>
    <outputDirectory>${output.basedir}/${target.dir}/classes</outputDirectory>
    <testOutputDirectory>${output.basedir}/${target.dir}/test-classes</testOutputDirectory>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>net.stickycode.plugins</groupId>
          <artifactId>bounds-maven-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <preparationGoals>clean validate bounds:update enforcer:enforce verify</preparationGoals>
            <goals>validate enforcer:enforce deploy</goals>
            <localCheckout>true</localCheckout>
            <pushChanges>false</pushChanges>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.2</version>
          <configuration>
            <encoding>UTF-8</encoding>
            <source>1.8</source>
            <target>1.8</target>
            <testSource>1.8</testSource>
            <testTarget>1.8</testTarget>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.0.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-source-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.6</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</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-enforcer-plugin</artifactId>
          <version>3.0.0-M1</version>
          <configuration>
            <rules>
              <!-- Don't allow accidental inclusion of commons logging or log4j -->
              <bannedDependencies>
                <message>Please ensure you exclude all dependencies on logging implementations</message>
                <excludes>
                  <exclude>commons-logging</exclude>
                  <exclude>commons-logging-api</exclude>
                  <exclude>log4j:log4j</exclude>
                </excludes>
              </bannedDependencies>
              <requireJavaVersion>
                <version>[1.8,1.9)</version>
              </requireJavaVersion>
              <requireMavenVersion>
                <version>[3.5,)</version>
              </requireMavenVersion>
            </rules>

            <fail>true</fail>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <generateBackupPoms>false</generateBackupPoms>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>
  </build>



  <profiles>
    <profile>
      <!-- Make sure eclipse outputs to a different directory otherwise the builders will clash with command line. -->
      <id>running-in-eclipse</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <properties>
        <target.dir>target-eclipse</target.dir>
      </properties>
    </profile>

    <profile>
      <id>sign-release-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
              <execution>
                <id>no-snapshots</id>
                <!-- Invocation is defined by the release plugin goal set hence no executions -->
                <configuration>

                  <rules>
                    <requireReleaseDeps>
                      <message>No SNAPSHOTs allowed in depedency tree or parents allowed when releasing!</message>
                      <failWhenParentIsSnapshot>true</failWhenParentIsSnapshot>
                      <searchTransitive>true</searchTransitive>
                    </requireReleaseDeps>
                  </rules>

                  <fail>true</fail>
                </configuration>
              </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>

        </plugins>
      </build>
    </profile>

    <profile>
      <id>promote-to-central</id>
      <distributionManagement>
        <repository>
          <uniqueVersion>false</uniqueVersion>
          <name>Sonatype Oss Staging</name>
          <id>sonatype-nexus-staging</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <uniqueVersion>true</uniqueVersion>
          <name>Sonatype Oss Snapshots</name>
          <id>sonatype-nexus-snapshots</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>

</project>
