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

  <!--
    ~ An "Introduction to the POM" can be read here:
    ~ + https://maven.apache.org/guides/introduction/introduction-to-the-pom.html 
    ~
    ~ The "POM Reference" is here:
    ~ + http://maven.apache.org/pom.html
    ~
    ~ One of the points to emphasise is the differentiation between inheritance and aggregation.
    ~ A single POM can be (and often is) both a super POM and an aggregation POM:
    ~ + http://maven.apache.org/pom.html#Inheritance 
    ~ + http://maven.apache.org/pom.html#Aggregation_or_Multi-Module
    ~
    ~ In the current case, the parent POM of J8Unit project is made for inheritance (managing all the plugins and
    ~ dependencies). There is another POM file doing the aggregation.
  -->
  <modelVersion>4.0.0</modelVersion>
  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <groupId>org.j8unit</groupId>
  <artifactId>parent</artifactId>
  <version>1</version>
  <packaging>pom</packaging>

  <name>J8Unit Project (Parent POM)</name>
  <description>The Parent POM of all the J8Unit Projects.</description>
  <url>https://github.com/j8unit-team/j8unit</url>

  <licenses>
    <license>
      <name>Eclipse Public License 1.0</name>
      <url>http://www.eclipse.org/legal/epl-v10.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>SGA</id>
      <name>Stefan Gasterstädt</name>
      <email>stefan@gasterstädt.de</email>
      <url>http://stefan.gasterstädt.de</url>
    </developer>
    <developer>
      <id>ZAK</id>
      <name>Sascha Zak</name>
      <email>sascha.zak@zakdigital.de</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/j8unit-team/j8unit.git</connection>
    <developerConnection>scm:git:https://j8unit-team@github.com/j8unit-team/j8unit.git</developerConnection>
    <url>https://github.com/j8unit-team/j8unit.git</url>
    <tag>HEAD</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>
    <!-- === General Build Data === -->
    <version.java>1.8</version.java>
    <!-- http://maven.apache.org/general.html#encoding-warning -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- === Dependency Versions :: 1st Party (sorted alphabetically for traceability/reproducibility) === -->
    <version.j8unit.core>4.12.1</version.j8unit.core>
    <version.j8unit.javadoc>1.0.0</version.j8unit.javadoc>
    <version.j8unit.repository>1.0.0</version.j8unit.repository>
    <version.j8unit.showcases>0.0.1-SNAPSHOT</version.j8unit.showcases>
    <version.j8unit.spring>4.1.7</version.j8unit.spring>

    <!-- === Dependency Versions :: 3rd Party (sorted alphabetically for traceability/reproducibility) === -->
    <version.junit>4.12</version.junit>
    <version.spring.platform>1.1.4.RELEASE</version.spring.platform>
  </properties>

  <profiles>
    <profile>
      <id>gpg-signing</id>
      <activation>
        <property>
          <name>gpg.keyname</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencyManagement>
    <dependencies>
      <!-- === Managed Dependencies :: 1st Party (sorted alphabetically for traceability/reproducibility) === -->
      <dependency>
        <groupId>org.j8unit</groupId>
        <artifactId>core</artifactId>
        <version>${version.j8unit.core}</version>
      </dependency>
      <dependency>
        <groupId>org.j8unit</groupId>
        <artifactId>javadoc</artifactId>
        <version>${version.j8unit.javadoc}</version>
      </dependency>
      <dependency>
        <groupId>org.j8unit</groupId>
        <artifactId>repository</artifactId>
        <version>${version.j8unit.repository}</version>
      </dependency>
      <dependency>
        <groupId>org.j8unit</groupId>
        <artifactId>spring</artifactId>
        <version>${version.j8unit.spring}</version>
      </dependency>
      <!-- === Managed Dependencies :: 3rd Party (sorted alphabetically for traceability/reproducibility) === -->
      <dependency>
        <!-- TODO: Could it be sufficient enough to refer to "org.springframework:spring-framework-bom"? -->
        <groupId>io.spring.platform</groupId>
        <artifactId>platform-bom</artifactId>
        <version>${version.spring.platform}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <!-- === Managed Plugins (sorted alphabetically for traceability/reproducibility) === -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
          <configuration>
            <failOnError>true</failOnError>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.5.1</version>
          <configuration>
            <source>${version.java}</source>
            <target>${version.java}</target>
            <testSource>${version.java}</testSource>
            <testTarget>${version.java}</testTarget>
            <encoding>${project.build.sourceEncoding}</encoding>
            <failOnError>true</failOnError>
            <showDeprecation>true</showDeprecation>
            <showWarnings>true</showWarnings>
            <optimize>true</optimize>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <!-- In order to disable artifact signing, run "mvn -Dgpg.skip ..." -->
          <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>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>2.2</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-jar-plugin</artifactId>
          <version>3.0.2</version>
          <configuration>
            <forceCreation>true</forceCreation>
            <archive>
              <manifest>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <!-- In order to disable artifact signing, run "mvn -Dmaven.javadoc.skip=true ..." -->
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.4</version>
          <configuration>
            <encoding> ${project.build.sourceEncoding}</encoding>
            <docencoding>${project.reporting.outputEncoding}</docencoding>
            <failOnError>true</failOnError>
            <level>protected</level>
            <show>protected</show>
            <use>true</use>
            <linksource>true</linksource>
            <serialwarn>true</serialwarn>
            <validateLinks>true</validateLinks>
            <detectLinks>false</detectLinks>
            <!-- <detectLinks>true</detectLinks> -->
            <verbose>true</verbose>
            <detectJavaApiLink>true</detectJavaApiLink>
            <links>
              <link>http://junit.org/junit4/javadoc/latest/</link>
            </links>
            <!-- http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html -->
            <additionalparam>-Xdoclint:none</additionalparam>
            <!-- http://blog.codefx.org/java/new-javadoc-tags/#apiNote-implSpec-and-implNote -->
            <!-- https://github.com/CodeFX-org/demo-javadoc-8-tags/blob/master/pom.xml?ts=4#L110-L133 -->
            <tags>
              <tag>
                <name>apiNote</name>
                <placement>a</placement>
                <head>API Note:</head>
              </tag>
              <tag>
                <name>implSpec</name>
                <placement>a</placement>
                <head>Implementation Requirements:</head>
              </tag>
              <tag>
                <name>implNote</name>
                <placement>a</placement>
                <head>Implementation Note:</head>
              </tag>
              <tag><name>param</name></tag>
              <tag><name>return</name></tag>
              <tag><name>throws</name></tag>
              <tag><name>since</name></tag>
              <tag><name>version</name></tag>
              <tag><name>serialData</name></tag>
              <tag><name>see</name></tag>
            </tags>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </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-site-plugin</artifactId>
          <version>3.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
          <configuration>
            <includePom>false</includePom>
          </configuration>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <!-- In order to disable artifact signing, run "mvn -DskipTests=true ..." -->
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.19.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.12</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>
