<?xml version="1.0" encoding="UTF-8"?>
<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>org.bsc.maven</groupId>
    <artifactId>maven-confluence-parent</artifactId>
    <packaging>pom</packaging>
    <version>6.5</version>
    <name>CONFLUENCE-REPORTING::Parent</name>
    <description>Maven's plugin that allow to generate "project's documentation" directly to confluence allowing, in the same time, to keep in-sync both project &amp; documentation</description>
    <url>https://github.com/bsorrentino/maven-confluence-plugin</url>
    <licenses>
        <license>
            <name>Apache License Version 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>bsorrentino</id>
            <name>Bartolomeo Sorrentino</name>
            <email>bartolomeo.sorrentino@gmail.com</email>
        </developer>
    </developers>
    <modules>
        <module>maven-confluence-core</module>
        <module>maven-confluence-reporting-plugin</module>
        <module>maven-confluence-test</module>
        <module>maven-confluence-test/plugin-test</module>
        <module>maven-confluence-itest</module>
    </modules>
    <scm>
        <connection>scm:git:https://github.com/bsorrentino/maven-confluence-plugin.git</connection>
        <developerConnection>scm:git:https://github.com/bsorrentino/maven-confluence-plugin.git</developerConnection>
        <url>https://github.com/bsorrentino/maven-confluence-plugin</url>
        <tag>HEAD</tag>
    </scm>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/bsorrentino/maven-confluence-plugin/issues</url>
    </issueManagement>
    <distributionManagement>
        <repository>
            <id>${release.repo.id}</id>
            <name>central</name>
            <url>${release.repo.url}</url>
        </repository>
        <snapshotRepository>
            <id>${snapshot.repo.id}</id>
            <name>snapshots</name>
            <url>${snapshot.repo.url}</url>
        </snapshotRepository>
        <!--
        <site>
          <id>google-project</id>
          <url>svn:https://bsc-documentation-repo.googlecode.com/svn/trunk/maven-confluence-plugin/</url>
        </site>
        -->
    </distributionManagement>
    <properties>
        <release.repo.id>sonatype-server</release.repo.id>
        <pluginToolsVersion>3.6.0</pluginToolsVersion>
        <addTimestamp>true</addTimestamp>
        <snapshot.repo.url>https://oss.sonatype.org/content/repositories/snapshots</snapshot.repo.url>
        <mavenVersion>3.3.1</mavenVersion>
        <reports-plugin-version>2.4</reports-plugin-version>
        <release.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2</release.repo.url>
        <tag>${project.artifactId}-${project.version}</tag>
        <snapshot.repo.id>sonatype-server</snapshot.repo.id>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <repositories>
        <repository>
            <id>${snapshot.repo.id}</id>
            <name>snapshots</name>
            <url>${snapshot.repo.url}</url>
        </repository>
    </repositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>${mavenVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>${mavenVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-annotations</artifactId>
                <version>${pluginToolsVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-generators</artifactId>
                <version>${pluginToolsVersion}</version>
                <!--
                SUCH EXCLUSIONS HAVE NEEDED FOR 'ASM' CLASH BETWEEN
                3.3.1 CONTAINED HERE AND 5.0.3 REQUIRED BY PEGDOWN
                <exclusions>
                    <exclusion>
                        <groupId>asm</groupId>
                        <artifactId>asm</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>asm</groupId>
                        <artifactId>asm-tree</artifactId>
                    </exclusion>
                </exclusions>
                -->
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-utils</artifactId>
                <version>3.0.8</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-api</artifactId>
                <version>${pluginToolsVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.bsc.util</groupId>
                <artifactId>minitemplator-repackaged</artifactId>
                <version>1.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugin-testing</groupId>
                <artifactId>maven-plugin-testing-harness</artifactId>
                <version>2.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-aether-provider</artifactId>
                <version>${mavenVersion}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.pegdown</groupId>
                <artifactId>pegdown</artifactId>
                <version>1.6.0</version>
            </dependency>

            <dependency>
               <groupId>org.apache.xmlrpc</groupId>
               <artifactId>xmlrpc-client</artifactId>
               <version>3.1.3</version>
           </dependency>

           <dependency>
               <groupId>commons-httpclient</groupId>
               <artifactId>commons-httpclient</artifactId>
               <version>3.1</version>
           </dependency>

            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.11</version>
            </dependency>

           <dependency>
             <groupId>org.javalite</groupId>
             <artifactId>javalite-common</artifactId>
             <version>1.4.11</version>
           </dependency>

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

        </dependencies>
    </dependencyManagement>

    <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.10</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
    <build>
        <!--
        <extensions>
            <extension>
                <groupId>org.jvnet.wagon-svn</groupId>
                <artifactId>wagon-svn</artifactId>
                <version>1.8</version>
            </extension>
        </extensions>
        -->
         <pluginManagement>
            <plugins>

                <plugin>
                    <!-- Separates the unit tests from the integration tests. -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.2</version>
                    <configuration>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>

                <!--
                    jgitflow:feature-start Starts a feature branch
                    jgitflow:feature-finish Finishes a feature branch
                    # Starts a release
                    jgitflow:release-start -DreleaseVersion=  -DdevelopmentVersion=
                    jgitflow:release-finish Finishes a release
                    jgitflow:hotfix-start Starts a hotfix
                    jgitflow:hotfix-finish Finishes a hotfix
                    jgitflow:build-number Updates the pom versions in the current branch by adding a build number label
                -->
                <plugin>
                    <groupId>external.atlassian.jgitflow</groupId>
                    <artifactId>jgitflow-maven-plugin</artifactId>
                    <version>1.0-m5.1</version>
                    <configuration>
                        <flowInitContext>
                          <versionTagPrefix>v</versionTagPrefix>
                        </flowInitContext>
                        <!-- see goals wiki page for configuration options -->
                        <noDeploy>true</noDeploy>
                    </configuration>
                </plugin>

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

                <plugin>
                    <groupId>se.bjurr.gitchangelog</groupId>
                    <artifactId>git-changelog-maven-plugin</artifactId>
                    <version>1.60</version>
                </plugin>

            </plugins>
        </pluginManagement>
        <plugins>

            <!--
            mvn git-changelog-maven-plugin:git-changelog -N -DtoRef=refs/heads/release/...
            -->
            <plugin>
      				<groupId>se.bjurr.gitchangelog</groupId>
      				<artifactId>git-changelog-maven-plugin</artifactId>
              <inherited>false</inherited>
      					<!-- Minimal config // -->
    						<configuration>
    						  <settingsFile>changelog.json</settingsFile>
    							<file>CHANGELOG.md</file>
    						</configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                    <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>

                <plugins>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>enforce-no-snapshots</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <phase>verify</phase>
                                <configuration>
                                    <rules>
                                        <requireReleaseDeps>
                                            <message>No Snapshots Allowed!</message>
                                        </requireReleaseDeps>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!--
                    ====================================================================================
                    # https://github.com/keybase/keybase-issues/issues/2798
                    export GPG_TTY=$(tty)
                    mvn -Prelease source:jar javadoc:jar deploy -Dgpg.passphrase=thephrase
                    ====================================================================================
                    -->
                    <plugin>
                        <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>
                        <configuration>
                          <gpgArguments>
                            <arg>--pinentry-mode</arg>
                            <arg>loopback</arg>
                          </gpgArguments>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.5.1</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>sonatype-server</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <stagingProfileId />
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
