<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.bsc</groupId>
  <artifactId>forge-addon</artifactId>
  <version>4</version>
  <packaging>pom</packaging>
  <name>FORGE::Addon parent</name>
  <description>FORGE addon parent</description>
  <url>https://github.com/bsorrentino/forge-addon/tree/master/forge-js-addon</url>
  <licenses>
    <license>
      <name>The MIT License (MIT)</name>
      <url>http://opensource.org/licenses/MIT</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>bsorrentino</id>
      <name>Bartolomeo Sorrentino</name>
      <email>bartolomeo.sorrentino@gmail.com</email>
    </developer>
  </developers>
  <modules>
    <module>js-addon-test</module>
  </modules>
  <scm>
    <connection>scm:git:https://github.com/bsorrentino/forge-addon.git</connection>
    <developerConnection>scm:git:https://github.com/bsorrentino/forge-addon.git</developerConnection>
    <url>https://github.com/bsorrentino/forge-addon.git</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>sonatype-server</id>
      <name>central</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-server</id>
      <name>snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <addTimestamp>true</addTimestamp>
    <tag>${project.artifactId}-${project.version}</tag>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <version.furnace>2.23.4.Final</version.furnace>
    <version.forge>3.2.0.Final</version.forge>

  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.jboss.forge</groupId>
        <artifactId>forge-bom</artifactId>
        <version>${version.forge}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.github.github</groupId>
          <artifactId>site-maven-plugin</artifactId>
          <version>0.8</version>
          <configuration>
            <message>Creating site for ${project.artifactId}</message>
            <server>github</server>
            <repositoryName>forge-addon</repositoryName>
            <repositoryOwner>bsorrentino</repositoryOwner>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
        </plugin>

        <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.0.0</version>
        </plugin>

        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <version>2.19.1</version>
        </plugin>

      </plugins>


    </pluginManagement>


    <plugins>

        <plugin>
           <groupId>external.atlassian.jgitflow</groupId>
           <artifactId>jgitflow-maven-plugin</artifactId>
           <version>1.0-m5.1</version>
           <configuration>
             <flowInitContext>
               <versionTagPrefix>v</versionTagPrefix>
            </flowInitContext>
           </configuration>
       </plugin>

    </plugins>

  </build>
  <profiles>
    <profile>
    <!--
    ====================================================================================
    mvn -Prelease release:perform -Dtag=tagname -Darguments=-Dgpg.passphrase=thephrase
    ====================================================================================
    -->
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.3</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </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>
