<?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>2</version>
  <packaging>pom</packaging>

  <parent>
    <groupId>org.sonatype.forge</groupId>
    <artifactId>forge-parent</artifactId>
    <version>38</version>
  </parent>

  <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>
  <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>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <maven.compiler.source>1.7</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>1.7</maven.compiler.target>

    <snapshot.repo.id>sonatype-server</snapshot.repo.id>
    <snapshot.repo.url>https://oss.sonatype.org/content/repositories/snapshots</snapshot.repo.url>
    <release.repo.id>sonatype-server</release.repo.id>
    <release.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2</release.repo.url>

    <addTimestamp>true</addTimestamp>
    <tag>${project.artifactId}-${project.version}</tag>
  </properties>

  <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>
  </distributionManagement>
  
   <repositories>
    <repository>
      <id>${snapshot.repo.id}</id>
      <url>${snapshot.repo.url}</url>
    </repository>
  </repositories>
  
  <build>
  <pluginManagement>
	<plugins>
	    <!--
            =====================================================
            DEPLOY SITE TO GITHUB
            
            Note:
            It works only version 0.8 with maven 3.0.5 
            
            > mvn com.github.github:site-maven-plugin:site -N
            =====================================================
            -->
            <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.7</source>
		          <target>1.7</target>
		          <encoding>UTF-8</encoding>
		        </configuration>
		      </plugin>

		      <plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-javadoc-plugin</artifactId>
		        <version>2.9.1</version>
		      </plugin>
	
	</plugins>
  </pluginManagement>
  </build>
  
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
         <!-- 
         ==================================================================================== 
         mvn -Prelease release:perform -Dgoals=deploy -Darguments=-Dgpg.passphrase=thephrase 
         ==================================================================================== 
         -->
          <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>
