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

  <parent>
    <groupId>io.ultreia.maven</groupId>
    <artifactId>pom</artifactId>
    <version>20</version>
  </parent>

  <groupId>io.ultreia.java4all.jgitflow</groupId>
  <artifactId>jgitflow-parent</artifactId>
  <version>1.0.0-rc-1</version>
  <packaging>pom</packaging>

  <name>JGitFlow :: Pom</name>
  <description>The parent pom for the Jgit Flow project</description>
  <url>https://ultreiaio.gitlab.io/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>

  <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>
      <roles>
        <role>lead</role>
        <role>developer</role>
      </roles>
      <timezone>Europe/Paris</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/${organizationId}/${projectId}</url>
    <connection>scm:git:git@gitlab.com:${organizationId}/${projectId}.git</connection>
    <developerConnection>scm:git:ssh://git@gitlab.com:${organizationId}/${projectId}.git</developerConnection>
  </scm>
  <distributionManagement>
    <site>
      <id>gitlab.com</id>
      <url>scm:git:https://git@gitlab.com/${organizationId}/${projectId}.git</url>
    </site>
  </distributionManagement>

  <properties>

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

    <javaVersion>1.7</javaVersion>
    <signatureArtifactId>java17</signatureArtifactId>
    <signatureVersion>1.0</signatureVersion>

    <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>
    <jgitflowPluginVersion>1.0-m5.1</jgitflowPluginVersion>

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

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

    <!--Gitlab configuration-->
    <gitlab.changesTitle>JGit Flow changelog</gitlab.changesTitle>
    <gitlab.changesAuthor>Tony Chemit</gitlab.changesAuthor>
    <gitlab.changesAuthorEmail>dev@tchemit.fr</gitlab.changesAuthorEmail>
    <gitlab.trackers>critical,bug,enhancement,support,documentation</gitlab.trackers>

    <javadoc.failOnError>false</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</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>
        </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>
        </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-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>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>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.3</version>
          <configuration>
            <topSiteURL>scm:git:https://git@gitlab.com/${organizationId}/${projectId}.git</topSiteURL>
            <stagingDirectory>${user.dir}/target/staging</stagingDirectory>
          </configuration>
          <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>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <configuration>
            <scmBranch>pages</scmBranch>
          </configuration>
        </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>

        <!-- Temporary workaround for jira.codehaus.org/browse/MPLUGIN-244 -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <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>
    </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/${organizationId}/${projectId}/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>

      <build>

        <plugins>

          <plugin>
            <groupId>io.ultreia.maven</groupId>
            <artifactId>gitlab-maven-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <inherited>false</inherited>
                <goals>
                  <goal>generate-changes</goal>
                </goals>
                <phase>pre-site</phase>
              </execution>
            </executions>
          </plugin>

        </plugins>

      </build>

    </profile>

  </profiles>


</project>
