<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  JGitFlow :: Pom
  %%
  Copyright (C) 2017 Atlassian Pty, LTD, Ultreia.io
  %%
  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.
  #L%
  -->

<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.manamind.jgitflow</groupId>
  <artifactId>jgitflow-parent</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>

  <name>JGitFlow :: Pom</name>
  <description>The parent pom for the Jgit Flow project</description>
  <url>https://gitlab.com/oyvindwe/jgit-flow</url>
  <organization>
    <name>Atlassian</name>
    <url>http://www.atlassian.com/</url>
  </organization>
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>
  <inceptionYear>2013</inceptionYear>

  <developers>
    <developer>
      <name>Jonathan Doklovic</name>
      <organization>Atlassian</organization>
      <email>doklovic@atlassian.com</email>
    </developer>
    <developer>
      <id>tchemit</id>
      <name>Tony Chemit</name>
      <email>dev@tchemit.fr</email>
      <organization>Ultreia.io</organization>
      <organizationUrl>http://ultreia.io</organizationUrl>
      <timezone>Europe/Paris</timezone>
    </developer>
    <developer>
      <id>omw</id>
      <name>Øyvind Matheson Wergeland</name>
      <email>omw@oms.no</email>
      <organization>Oslo Market Solutions AS</organization>
      <organizationUrl>https://oms.no</organizationUrl>
      <timezone>Europe/Oslo</timezone>
    </developer>
  </developers>

  <modules>
    <module>jgitflow-core</module>
    <module>jgitflow-maven-api</module>
    <module>jgitflow-it-support</module>
    <module>jgitflow-maven-plugin</module>
  </modules>

  <scm>
    <url>https://gitlab.com/${projectPath}</url>
    <connection>scm:git:git@gitlab.com:${projectPath}.git</connection>
    <developerConnection>scm:git:ssh://git@gitlab.com:${projectPath}.git</developerConnection>
  </scm>
  <issueManagement>
    <system>gitlab</system>
    <url>https://gitlab.com/${projectPath}/issues</url>
  </issueManagement>
  <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>
    <site>
      <id>gitlab.com</id>
      <url>scm:git:https://git@gitlab.com/${projectPath}.git</url>
    </site>
  </distributionManagement>

  <properties>
    <projectPath>oyvindwe/jgit-flow</projectPath>
    <stageId>oyvindwe</stageId>

    <!-- default encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- report plugins version -->
    <changesPluginVersion>2.12.1</changesPluginVersion>
    <projectInfoReportsPluginVersion>2.9</projectInfoReportsPluginVersion>
    <changelogPluginVersion>2.3</changelogPluginVersion>
    <jrxPluginVersion>2.5</jrxPluginVersion>
    <sonarReportPluginVersion>0.1</sonarReportPluginVersion>

    <!-- apache maven plugins version -->
    <antRunPluginVersion>1.8</antRunPluginVersion>
    <assemblyPluginVersion>3.1.0</assemblyPluginVersion>
    <cleanPluginVersion>3.0.0</cleanPluginVersion>
    <compilerPluginVersion>3.7.0</compilerPluginVersion>
    <dependencyPluginVersion>3.0.1</dependencyPluginVersion>
    <deployPluginVersion>2.8.2</deployPluginVersion>
    <enforcerPluginVersion>3.0.0-M1</enforcerPluginVersion>
    <gpgPluginVersion>1.6</gpgPluginVersion>
    <installPluginVersion>2.5.2</installPluginVersion>
    <invokerPluginVersion>3.0.1</invokerPluginVersion>
    <jarPluginVersion>3.0.2</jarPluginVersion>
    <jarSignerPluginVersion>1.4</jarSignerPluginVersion>
    <javadocPluginVersion>3.0.0-M1</javadocPluginVersion>
    <pluginPluginVersion>3.5</pluginPluginVersion>
    <pmdPluginVersion>3.8</pmdPluginVersion>
    <releasePluginVersion>2.5.3</releasePluginVersion>
    <remoteResourcesPluginVersion>1.5</remoteResourcesPluginVersion>
    <resourcesPluginVersion>3.0.2</resourcesPluginVersion>
    <shadePluginVersion>3.1.0</shadePluginVersion>
    <sitePluginVersion>3.6</sitePluginVersion>
    <sourcePluginVersion>3.0.1</sourcePluginVersion>
    <surefirePluginVersion>2.20.1</surefirePluginVersion>

    <!-- codehaus mojo plugins -->
    <buildHelperPluginVersion>3.0.0</buildHelperPluginVersion>
    <buildNumberPluginVersion>1.4</buildNumberPluginVersion>
    <animalSnifferPluginVersion>1.16</animalSnifferPluginVersion>
    <coberturaPluginVersion>2.7</coberturaPluginVersion>
    <execPluginVersion>1.6.0</execPluginVersion>
    <findbugsPluginVersion>3.0.5</findbugsPluginVersion>
    <l10nPluginVersion>1.0-alpha-2</l10nPluginVersion>
    <licensePluginVersion>1.14</licensePluginVersion>
    <sonarPluginVersion>3.3.0.603</sonarPluginVersion>
    <tidyPluginVersion>1.0.0</tidyPluginVersion>
    <versionsPluginVersion>2.5</versionsPluginVersion>
    <wagonPluginVersion>1.0</wagonPluginVersion>

    <!-- codehaus plexus plugins -->
    <plexusComponentMetadataPluginVersion>1.7.1</plexusComponentMetadataPluginVersion>

    <!-- nuiton plugins -->
    <helperPluginVersion>2.3.2</helperPluginVersion>

    <organizationId>manamind</organizationId>
    <projectId>jgit-flow</projectId>

    <javaVersion>1.7</javaVersion>
    <signatureArtifactId>java17</signatureArtifactId>
    <signatureVersion>1.0</signatureVersion>
    <jgitflowPluginVersion>1.0.0-rc-1</jgitflowPluginVersion>

    <maven.version>2.2.1</maven.version>
    <!--<mavenVersion>3.0.5</mavenVersion>-->
    <jsch.agent.version>0.0.9</jsch.agent.version>
    <slf4j.version>1.7.25</slf4j.version>

    <!-- license header configuration -->
    <license.licenseName>apache_v2</license.licenseName>
    <license.organizationName>Atlassian Pty, LTD, Ultreia.io, Oslo Market Solutions AS</license.organizationName>

    <!-- Site configuration -->
    <locales>en</locales>
    <generateSitemap>true</generateSitemap>
    <relativizeDecorationLinks>false</relativizeDecorationLinks>

    <!--Gitlab configuration-->
    <gitlab.changesTitle>JGit Flow changelog</gitlab.changesTitle>
    <gitlab.changesAuthor>Øyvind Matheson Wergeland</gitlab.changesAuthor>
    <gitlab.changesAuthorEmail>omw@oms.no</gitlab.changesAuthorEmail>
    <gitlab.trackers>critical,bug,enhancement,support,documentation</gitlab.trackers>

    <maven.javadoc.failOnError>false</maven.javadoc.failOnError>

    <!--deploy all-->
    <maven.deploy.skip>false</maven.deploy.skip>
    <!--build javadoc-->
    <maven.javadoc.skip>false</maven.javadoc.skip>
    <!--build sources-->
    <maven.source.skip>false</maven.source.skip>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.eclipse.jgit</groupId>
        <artifactId>org.eclipse.jgit.console</artifactId>
        <version>3.7.1.201504261725-r</version>
        <exclusions>
          <exclusion>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jgit</groupId>
        <artifactId>org.eclipse.jgit</artifactId>
        <version>4.5.3.201708160445-r</version>
        <exclusions>
          <exclusion>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>jline</groupId>
        <artifactId>jline</artifactId>
        <version>1.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.1</version>
      </dependency>
      <dependency>
        <groupId>org.jdom</groupId>
        <artifactId>jdom2</artifactId>
        <version>2.0.6</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>20.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-api</artifactId>
        <version>1.9.4</version>
      </dependency>
      <dependency>
        <groupId>jaxen</groupId>
        <artifactId>jaxen</artifactId>
        <version>1.1-beta-8</version>
      </dependency>
      <dependency>
        <groupId>classworlds</groupId>
        <artifactId>classworlds</artifactId>
        <version>1.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${maven.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-webdav-jackrabbit</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${maven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>${maven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${maven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-settings</artifactId>
        <version>${maven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact-manager</artifactId>
        <version>${maven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.release</groupId>
        <artifactId>maven-release-manager</artifactId>
        <version>2.5.3</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-providers-standard</artifactId>
          </exclusion>
          <exclusion>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.jdom</groupId>
            <artifactId>jdom</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.release</groupId>
        <artifactId>maven-release-api</artifactId>
        <version>2.5.3</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${pluginPluginVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-interpolation</artifactId>
        <version>1.24</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-interactivity-api</artifactId>
        <version>1.0-alpha-6</version>
        <exclusions>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-component-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.5</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.9</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>2.2.1</version>
      </dependency>

      <!-- jsch agent stuff -->
      <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch.agentproxy.jsch</artifactId>
        <version>${jsch.agent.version}</version>
      </dependency>
      <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch.agentproxy.core</artifactId>
        <version>${jsch.agent.version}</version>
      </dependency>
      <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch</artifactId>
        <version>0.1.54</version>
      </dependency>
      <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch.agentproxy.usocket-jna</artifactId>
        <version>${jsch.agent.version}</version>
      </dependency>
      <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch.agentproxy.sshagent</artifactId>
        <version>${jsch.agent.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.servicemix.bundles</groupId>
        <artifactId>org.apache.servicemix.bundles.jsch</artifactId>
        <version>0.1.54_1</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-annotations</artifactId>
        <version>1.7.1</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-container-default</artifactId>
        <version>1.0-alpha-9-stable-1</version>
        <scope>compile</scope>
      </dependency>

      <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>1</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
        <scope>runtime</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <resources>
      <resource>
        <directory>src/main/filtered-resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
        <filtering>true</filtering>
      </resource>

      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>

        <!-- Plugins from apache -->

        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.3</version>
          <dependencies>
            <dependency>
              <groupId>lt.velykis.maven.skins</groupId>
              <artifactId>reflow-velocity-tools</artifactId>
              <version>1.1.1</version>
            </dependency>
            <dependency>
              <groupId>org.apache.velocity</groupId>
              <artifactId>velocity</artifactId>
              <version>1.7</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemPropertyVariables>
              <java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>
            </systemPropertyVariables>
            <excludes>
              <exclude>**/*$*</exclude>
              <exclude>it/**</exclude>
            </excludes>
            <argLine>-Xmx1024m</argLine>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${antRunPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${assemblyPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${cleanPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${compilerPluginVersion}</version>
          <configuration>
            <compilerArgs>
              <arg>-Xlint:unchecked</arg>
            </compilerArgs>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${dependencyPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${deployPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${enforcerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${gpgPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>${installPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>${invokerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-jarsigner-plugin</artifactId>
          <version>${jarSignerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${pluginPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${pmdPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>${releasePluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <version>${remoteResourcesPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${resourcesPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${shadePluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${sourcePluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${jarPluginVersion}</version>
          <inherited>true</inherited>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <url>${project.url}</url>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>

        <!-- Temporary workaround for jira.codehaus.org/browse/MPLUGIN-244 -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${javadocPluginVersion}</version>
          <configuration>
            <additionalparam>-Xdoclint:none</additionalparam>
            <quiet>true</quiet>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.3.7</version>
          <extensions>true</extensions>
        </plugin>


        <!-- Plugins from codehaus mojo -->

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>${animalSnifferPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${buildHelperPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${licensePluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-metadata</artifactId>
          <version>${plexusComponentMetadataPluginVersion}</version>
        </plugin>

        <!-- Plugins from nuiton -->
        <plugin>
          <groupId>org.nuiton</groupId>
          <artifactId>helper-maven-plugin</artifactId>
          <version>${helperPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>io.ultreia.java4all.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>${jgitflowPluginVersion}</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <addScmCommentSuffixOnMerge>false</addScmCommentSuffixOnMerge>
          </configuration>
          <executions>
            <execution>
              <id>default-cli</id>
              <goals>
                <goal>release-finish</goal>
              </goals>
              <configuration>
                <pushReleases>true</pushReleases>
                <enableSshAgent>true</enableSshAgent>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${nexusStaginPluginVersion}</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>

  </build>

  <profiles>

    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <reporting>
        <plugins>

          <plugin>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>${projectInfoReportsPluginVersion}</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>index</report>
                  <report>project-team</report>
                  <report>mailing-list</report>
                  <report>cim</report>
                  <report>issue-tracking</report>
                  <report>license</report>
                  <report>scm</report>
                  <report>dependency-info</report>
                  <report>dependencies</report>
                  <report>dependency-convergence</report>
                  <report>plugin-management</report>
                  <report>plugins</report>
                  <report>dependency-management</report>
                  <report>summary</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <artifactId>maven-changes-plugin</artifactId>
            <version>${changesPluginVersion}</version>
            <inherited>false</inherited>
            <configuration>
              <issueLinkTemplatePerSystem>
                <gitlab>https://gitlab.com/${projectPath}/issues/%ISSUE%</gitlab>
              </issueLinkTemplatePerSystem>
              <xmlPath>${project.build.directory}/generated-site/changes.xml</xmlPath>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>changes-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadocPluginVersion}</version>
          </plugin>

          <plugin>
            <artifactId>maven-changelog-plugin</artifactId>
            <version>${changelogPluginVersion}</version>
            <inherited>false</inherited>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>${licensePluginVersion}</version>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
            <version>${versionsPluginVersion}</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>dependency-updates-report</report>
                  <report>plugin-updates-report</report>
                  <report>property-updates-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

        </plugins>
      </reporting>
    </profile>


    <!-- perform only on a release stage when using the maven-release-plugin -->
    <profile>
      <id>license-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <build>

        <defaultGoal>generate-resources</defaultGoal>

        <plugins>

          <!-- add license and third-party files to build -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-licenses</id>
                <goals>
                  <goal>update-project-license</goal>
                  <goal>add-third-party</goal>
                </goals>
                <configuration>
                  <licenseMerges>
                    <licenseMerge>
                      The Apache Software License, Version 2.0|Apache License, Version 2.0|Apache License V2.0|Apache
                      2|ASF 2.0|apache-2.0|Apache Public License 2.0
                    </licenseMerge>
                    <licenseMerge>BSD License|BSD license|BSD</licenseMerge>
                    <licenseMerge>MIT License|MIT license|MIT</licenseMerge>
                    <licenseMerge>
                      Lesser General Public License (LPGL) v 2.1|GNU Lesser General Public License, 2.1|LGPL 2.1
                    </licenseMerge>
                    <licenseMerge>
                      Lesser General Public License (LPGL)|GNU Lesser General Public License|GNU LESSER GENERAL PUBLIC
                      LICENSE|LGPL|lgpl
                    </licenseMerge>
                    <licenseMerge>
                      COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0|Common Development and Distribution
                      License (CDDL) v1.0
                    </licenseMerge>
                    <licenseMerge>Indiana University Extreme! Lab Software License, version 1.1.1|Indiana University
                      Extreme! Lab Software License
                    </licenseMerge>
                  </licenseMerges>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>

      </build>
    </profile>

    <!-- perform only on a release to do quality checks on release -->
    <profile>
      <id>release-quality-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <build>
        <plugins>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>animal-sniffer-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <signature>
                    <groupId>org.codehaus.mojo.signature</groupId>
                    <artifactId>${signatureArtifactId}</artifactId>
                    <version>${signatureVersion}</version>
                  </signature>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>check-project</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <phase>validate</phase>
                <configuration>
                  <rules>
                    <requireFilesExist>
                      <files>
                        <file>LICENSE.txt</file>
                        <file>README.md</file>
                      </files>
                    </requireFilesExist>
                    <requireProperty>
                      <property>organizationId</property>
                      <message>"organizationId property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"organizationId property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireProperty>
                      <property>projectId</property>
                      <message>"projectId property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"projectId property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireProperty>
                      <property>stageId</property>
                      <message>"stageId property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"stageId property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireMavenVersion>
                      <version>${maven.version}</version>
                    </requireMavenVersion>
                    <dependencyConvergence />
                    <bannedDependencies>
                      <excludes>
                        <exclude>
                          org.codehaus.plexus:plexus-component-api
                        </exclude>
                      </excludes>
                      <message>
                        The new containers are not supported. You
                        probably added a dependency that is missing the
                        exclusions.
                      </message>
                    </bannedDependencies>
                    <enforceBytecodeVersion>
                      <maxJdkVersion>${javaVersion}</maxJdkVersion>
                    </enforceBytecodeVersion>
                    <banDuplicateClasses>
                      <findAllDuplicates>true</findAllDuplicates>
                    </banDuplicateClasses>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>extra-enforcer-rules</artifactId>
                <version>1.0-beta-4</version>
              </dependency>
            </dependencies>
          </plugin>

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

    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>get-pgp-pass-phrase</id>
                <goals>
                  <goal>share-server-secret</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <serverId>omw-gpg-signer</serverId>
                  <usernameOut>gpg.keyname</usernameOut>
                  <passwordOut>gpg.passphrase</passwordOut>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <argument>--charset</argument>
                    <argument>utf-8</argument>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- This profile update license stuff with new goal update-file-header -->
    <profile>
      <id>update-file-header</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <properties>
        <license.descriptor>src/license/project.xml</license.descriptor>
        <license.excludes>**/ftl/*.ftl,**/i18n/*.properties,**/THIRD-PARTY.properties,**/*.sh</license.excludes>
      </properties>
      <build>
        <defaultGoal>process-resources</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>update-file-header</id>
                <goals>
                  <goal>update-file-header</goal>
                </goals>
                <phase>process-resources</phase>
              </execution>
              <execution>
                <id>update-pom-header</id>
                <goals>
                  <goal>update-file-header</goal>
                </goals>
                <configuration>
                  <roots>
                    <root>${project.basedir}</root>
                  </roots>
                  <includes>
                    <include>pom.xml</include>
                  </includes>
                </configuration>
                <phase>process-resources</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>analyze-dependencies</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <defaultGoal>verify</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <inherited>true</inherited>
            <executions>
              <execution>
                <id>analyze</id>
                <goals>
                  <goal>analyze-only</goal>
                </goals>
                <configuration>
                  <verbose>true</verbose>
                  <failOnWarning>true</failOnWarning>
                  <ignoreNonCompile>true</ignoreNonCompile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>maven-3</id>
      <activation>
        <file>
          <!--  This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
          <exists>${basedir}</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-descriptor</id>
                <goals>
                  <goal>attach-descriptor</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>update-changelog</id>
      <build>
        <defaultGoal>generate-resources</defaultGoal>
        <plugins>
          <plugin>
            <groupId>io.ultreia.maven</groupId>
            <artifactId>gitlab-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>generate-changelog</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>update-staging-changelog</id>
      <build>
        <defaultGoal>generate-resources</defaultGoal>
        <plugins>
          <plugin>
            <groupId>io.ultreia.maven</groupId>
            <artifactId>gitlab-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <!--suppress MavenModelInspection -->
                  <goal>generate-staging-changelog</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Profile to generate a multi module site (you need to place file .mvn/simple-site fil in your project) -->
    <profile>
      <id>multi-module-site-profile</id>
      <activation>
        <file>
          <exists>${basedir}/.mvn/multi-module-site</exists>
        </file>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-site-plugin</artifactId>
              <configuration>
                <topSiteURL>scm:git:https://git@gitlab.com/${projectPath}.git</topSiteURL>
                <stagingDirectory>${user.dir}/target/staging</stagingDirectory>
              </configuration>
            </plugin>
            <plugin>
              <artifactId>maven-scm-publish-plugin</artifactId>
              <configuration>
                <scmBranch>pages</scmBranch>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>

  </profiles>
</project>
