<?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>com.manganit</groupId>
  <artifactId>manganit-parent</artifactId>
  <version>1.0</version>
  <packaging>pom</packaging>

  <name>ManganIT organization Parent POM</name>
  <description>ManganIT is an organization that develops IT Projects related to Apache Hadoop and Big Data development</description>
  <url>http://www.manganit.com</url>
  <inceptionYear>2017</inceptionYear>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <organization>
    <name>ManganIT</name>
    <url>http://www.manganit.com</url>
  </organization>

  <mailingLists>
    <mailingList>
      <name>ManganIT Announce List</name>
      <subscribe>announce-subscribe@manganit.com</subscribe>
      <unsubscribe>announce-unsubscribe@manganit.com</unsubscribe>
      <post>announce@manganit.com</post>
      <archive>https://mail-archives.manganit.com/mod_mbox/www-announce/</archive>
    </mailingList>
  </mailingLists>

  <developers>
    <developer>
      <name>Damien Claveau</name>
      <email>damien.claveau@manganit.com</email>
      <organization>ManganIT</organization>
      <organizationUrl>http://www.manganit.com</organizationUrl>
      <roles>
        <role>PMC Chair</role>
      </roles>
      <timezone>Europe/Paris</timezone>
    </developer>
  </developers>
  
  <contributors>
    <contributor>
      <name>Damien Claveau</name>
    </contributor>
  </contributors>
  
  <scm>
    <connection>scm:git:git://github.com/manganit/manganit-parent.git</connection>
    <developerConnection>scm:git:git@github.com:manganit/manganit-parent.git</developerConnection>
    <url>http://github.com/manganit/manganit-parent/tree/master</url>
    <tag>v1.0</tag>
  </scm>

  <issueManagement>
    <system>Github Issues</system>
    <url>http://github.com/manganit/manganit-parent/issues</url>
  </issueManagement>

  <ciManagement>
    <system />
    <url />
    <notifiers>
    </notifiers>
  </ciManagement>

  <properties>
    <distMgmtSnapshotsId>ossrh</distMgmtSnapshotsId>
    <distMgmtReleasesId>ossrh</distMgmtReleasesId>
    <distMgmtSnapshotsName>OSSRH Development Snapshots Repository</distMgmtSnapshotsName>
    <distMgmtReleasesName>OSSRH Releases Distribution Repository</distMgmtReleasesName>
    <distMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
    <distMgmtReleasesUrl>https://oss.sonatype.org/service/local/staging/deploy/maven2/</distMgmtReleasesUrl>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <!--<parent.version>2.2.4</parent.version>-->
    <!-- cf http://blog.xebia.com/2012/09/30/continuous-releasing-of-maven-artifacts/ -->
    <!--<release>2.2.4</release>-->
    <!--<revision>SNAPSHOT</revision>-->
    <snapshotDependencyAllowed>false</snapshotDependencyAllowed>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>${distMgmtSnapshotsId}</id>
      <name>${distMgmtSnapshotsName}</name>
      <url>${distMgmtSnapshotsUrl}</url>
    </snapshotRepository>
    <repository>
      <id>${distMgmtReleasesId}</id>
      <name>${distMgmtReleasesName}</name>
      <url>${distMgmtReleasesUrl}</url>
    </repository>
  </distributionManagement>
  
<!--  <repositories>
    <repository>
      <id>${distMgmtSnapshotsId}</id>
      <url>${distMgmtSnapshotsName}</url>
      <name>${distMgmtSnapshotsUrl}</name>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
      </snapshots>
    </repository>
    <repository>
      <id>${distMgmtReleasesId}</id>
      <url>${distMgmtReleasesUrl}</url>
      <name>${distMgmtReleasesName}</name>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>-->
  
  <prerequisites>
    <maven>${maven.version}</maven>
  </prerequisites>
  
  <build>
    <defaultGoal>install</defaultGoal>
    <pluginManagement>
      <plugins />
    </pluginManagement>
    <plugins>
      <!-- We want to deploy the artifact to a staging location -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <inherited>true</inherited>
        <version>2.8.2</version>
        <configuration>
          <updateReleaseInfo>true</updateReleaseInfo>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.5.2</version>
      </plugin>      
<!--      <plugin>    
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.7</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <!--mvn -B release:prepare then mvn -B release:perform-->
          <mavenExecutorId>forked-path</mavenExecutorId>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <arguments>-Psonatype-oss-release</arguments>
          <goals>deploy</goals>
          <!-- for debug purpose -->
          <localCheckout>true</localCheckout>
          <pushChanges>false</pushChanges>
        </configuration>
      </plugin>  
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4</version>
        <executions>  
          <execution>
            <id>enforce-maven-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>${maven.version}</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>          
          <execution>
            <!-- Make sure that only non-snapshot versions are used for the dependencies.
            Only active when property 'snapshotDependencyAllowed' is false. -->
            <id>enforce-no-snapshots</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <skip>${snapshotDependencyAllowed}</skip>
              <rules>
                <requireReleaseDeps>
                  <message>No Snapshots Allowed!</message>
                  <onlyWhenRelease>true</onlyWhenRelease>
                  <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
                </requireReleaseDeps>
                <!--
                <requireReleaseVersion>
                    <message>No Snapshots Allowed!</message>
                </requireReleaseVersion>
                -->
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
  <profile> 
  <id>release</id>
    <activation>
      <property>
        <name>performRelease</name>
        <value>true</value>
      </property>
    </activation>
  <build>
    <defaultGoal>deploy</defaultGoal>
    <plugins>
      <!-- We want to sign the artifact, the POM, and all attached artifacts -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.3</version>
        <configuration>
          <show>private</show>
          <nohelp>true</nohelp>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>      
    </plugins>
  </build>
  </profile>
  </profiles>
  
</project>
