<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2012-2017, FOSS Nova Software foundation (FNSF),
  ~ and individual contributors as indicated by the @author tags.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not see the FSF site:
  ~ http://www.fsf.org/ and search for the LGPL License document there.
  -->
<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>

  <name>FOSS Nova Maven Parent</name>
  <groupId>org.fossnova</groupId>
  <artifactId>fossnova-maven-parent</artifactId>
  <description>Parent POM for all FOSS Nova projects</description>
  <packaging>pom</packaging>
  <version>1.0.0</version>
  <url>http://fossnova.org</url>

  <scm>
    <connection>scm:git:git@github.com:fossnova/maven-parent.git</connection>
    <developerConnection>scm:git:git@github.com:fossnova/maven-parent.git</developerConnection>
    <url>http://github.com/fossnova/maven-parent</url>
  </scm>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/fossnova/maven-parent/issues</url>
  </issueManagement>

  <licenses>
    <license>
      <name>GNU Lesser General Public License, Version 2.1</name>
      <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>FOSS Nova Software Foundation</name>
    <url>http://fossnova.org</url>
  </organization>

  <developers>
    <developer>
      <id>fossnova.org</id>
      <name>FOSS Nova Community</name>
      <organization>FOSS Nova Software Foundation</organization>
      <organizationUrl>http://fossnova.org</organizationUrl>
    </developer>
  </developers>

  <properties>
    <version.checkstyle.plugin>2.17</version.checkstyle.plugin>
    <version.clean.plugin>3.0.0</version.clean.plugin>
    <version.compiler.plugin>3.5.1</version.compiler.plugin>
    <version.deploy.plugin>2.8.2</version.deploy.plugin>
    <version.enforcer.plugin>1.4.1</version.enforcer.plugin>
    <version.gpg.plugin>1.6</version.gpg.plugin>
    <version.help.plugin>2.2</version.help.plugin>
    <version.install.plugin>2.5.2</version.install.plugin>
    <version.jar.plugin>3.0.2</version.jar.plugin>
    <version.javadoc.plugin>2.10.4</version.javadoc.plugin>
    <version.resources.plugin>3.0.1</version.resources.plugin>
    <version.source.plugin>3.0.1</version.source.plugin>
    <version.surefire.plugin>2.19.1</version.surefire.plugin>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.testTarget>${maven.compiler.target}</maven.compiler.testTarget>
    <maven.compiler.testSource>${maven.compiler.source}</maven.compiler.testSource>
    <maven.compiler.argument.target>${maven.compiler.target}</maven.compiler.argument.target>
    <maven.compiler.argument.source>${maven.compiler.source}</maven.compiler.argument.source>
    <maven.compiler.argument.testTarget>${maven.compiler.testTarget}</maven.compiler.argument.testTarget>
    <maven.compiler.argument.testSource>${maven.compiler.testSource}</maven.compiler.argument.testSource>
    <maven.min.version>3.5.0</maven.min.version>
    <jdk.min.version>${maven.compiler.source}</jdk.min.version>
    <maven.deploy.skip>false</maven.deploy.skip>
    <gpg.skip>false</gpg.skip>
    <maven.install.skip>false</maven.install.skip>
    <maven.javadoc.skip>true</maven.javadoc.skip>
    <version.checkstyle>7.8.2</version.checkstyle>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${version.checkstyle.plugin}</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${version.checkstyle}</version>
            </dependency>
          </dependencies>
          <configuration>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
            <consoleOutput>true</consoleOutput>
            <failsOnError>false</failsOnError>
            <linkXRef>false</linkXRef>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${version.clean.plugin}</version>
          <configuration>
            <failOnError>true</failOnError>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${version.compiler.plugin}</version>
          <configuration>
            <fork>true</fork>
            <optimize>true</optimize>
            <showDeprecation>true</showDeprecation>
            <showWarnings>true</showWarnings>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
            <testSource>${maven.compiler.testSource}</testSource>
            <testTarget>${maven.compiler.testTarget}</testTarget>
            <compilerArgs>
              <arg>-Xlint</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${version.deploy.plugin}</version>
          <configuration>
            <skip>${maven.deploy.skip}</skip>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${version.enforcer.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${version.gpg.plugin}</version>
          <configuration>
            <skip>${gpg.skip}</skip>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>${version.help.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${version.install.plugin}</version>
          <configuration>
            <skip>${maven.install.skip}</skip>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${version.jar.plugin}</version>
          <configuration>
            <skipIfEmpty>true</skipIfEmpty>
            <archive>
              <index>true</index>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${version.javadoc.plugin}</version>
          <configuration>
            <detectJavaApiLink>false</detectJavaApiLink>
            <detectLinks>false</detectLinks>
            <skip>${maven.javadoc.skip}</skip>
            <doctitle><![CDATA[<b>${project.name} ${project.version}</b>]]></doctitle>
            <header><![CDATA[<b>${project.name} ${project.version}</b>]]></header>
            <footer><![CDATA[<b>${project.name} ${project.version}</b>]]></footer>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${version.resources.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${version.source.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${version.surefire.plugin}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <message>Java ${jdk.min.version} or higher is required to build this project. Please install it.</message>
                  <version>${jdk.min.version}</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>enforce-maven-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <message>Maven ${maven.min.version} or higher is required to build this project. Please install it.</message>
                  <version>${maven.min.version}</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>gpg-sign</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <useAgent>true</useAgent>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <distributionManagement>
    <repository>
      <id>jboss-releases-repository</id>
      <name>JBoss Releases Repository</name>
      <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

</project>
