<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.nanoj</groupId>
	
	<!-- ========== ARTEFACT IDENTIFICATION -->
	<artifactId>nanoj-commons</artifactId> <!-- PROJECT SPECIFIC -->
	<version>0.8.3</version> <!-- PROJECT SPECIFIC -->
	
	<name>NanoJ commons</name> <!-- PROJECT SPECIFIC -->
	<description>NanoJ commons and utilities classes</description> <!-- PROJECT SPECIFIC -->
	<!-- ========== END OF ARTEFACT IDENTIFICATION -->

	<!-- Distribution Management for Sonatype specific plugin -->
	<!-- 
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	 -->
	 
	<!-- Distribution Management for the standard Maven deploy plugin (need a full distributionManagement section) -->
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>
	<!-- This configuration will get the user account details to deploy to OSSRH from settings.xml file. 
	A minimal settings with the authentication is 
	<settings>
	  <servers>
	    <server>
	      <id>ossrh</id>
	      <username>your-jira-id</username>
	      <password>your-jira-pwd</password>
	    </server>
	  </servers>
	</settings>	
	-->

	<!-- ========== -->
	<url>http://www.nanoj.org/</url>
  
	<licenses>
		<license>
			<name>GNU LESSER GENERAL PUBLIC LICENSE, Version 3</name>
			<url>http://www.gnu.org/licenses/lgpl.html</url>
		</license>
	</licenses>
	
	<developers>
		<developer>
			<name>Laurent Guérin</name>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:nanoj-org/nanoj-commons.git</connection>
		<developerConnection>scm:git:git@github.com:nanoj-org/nanoj-commons.git</developerConnection>
		<url>git@github.com:nanoj-org/nanoj-commons.git</url>
	</scm>
	<!-- ========== -->

	<build>
		<plugins>

			<plugin>
			    <groupId>org.apache.maven.plugins</groupId>
			    <artifactId>maven-compiler-plugin</artifactId>
			    <version>2.5.1</version>
			    <configuration>
			        <source>1.7</source>
			        <target>1.7</target>
			    </configuration>
			</plugin>
			
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.9.0</version>
                <configuration>
                    <header>src/license/license-header.txt</header>
                    <includes>
                        <include>src/main/java/**</include>
                    </includes>
                    <strictCheck>true</strictCheck>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <!--
                            check  : verify if some files miss license header
                            format : add the license header when missing. If a header is existing, it is updated to the new one
                            remove : remove existing license header
                            RUN : license:format
                            -->
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
			<plugin> <!-- Sources packaging (xxx-version-sources.jar ) / source:jar goal -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
                <version>3.0.0</version>
                <!-- 
				<configuration>
					<skip>true</skip>
				</configuration>                
                -->
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<!-- <phase>deploy</phase> --> <!-- Phase changed -->
					</execution>
				</executions>
			</plugin>
			
			<plugin> <!-- Javadoc packaging (xxx-version-javadoc.jar ) / javadoc:jar goal -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <!-- 
				<configuration>
					<skip>true</skip>
				</configuration>
                -->
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<!-- <phase>deploy</phase>  --> <!-- Phase changed -->
					</execution>
				</executions>
			</plugin>

			<!-- PGP signatures generation with GPG (GnuPG) : requires 'gpg' command on the system -->
			<!-- 
			<plugin> 
				<groupId>org.apache.maven.plugins</groupId>
				<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>
			</plugin>
			 -->

			<!-- PGP signatures using existing keys -->
			<!-- Removed temporarily 
			 -->
			<plugin>
				<groupId>org.kohsuke</groupId>
				<artifactId>pgp-maven-plugin</artifactId>
				<version>1.1</version>
				<configuration>
					<skip>${skip-pgp}</skip>
				<!-- 
					<secretkey>keyfile:${project.basedir}/pgp/private-key.txt</secretkey>
					<passphrase>file:${project.basedir}/pgp/passphrase.txt</passphrase>
				 -->
					<secretkey>keyfile:${secretkey-file}</secretkey>
					<passphrase>file:${passphrase-file}</passphrase>
				</configuration>				
				<executions>
					<execution>
						<goals>
							<goal>sign</goal>
						</goals>
						<!-- <phase>deploy</phase>  --> <!-- Phase changed -->
					</execution>
				</executions>
			</plugin>
			
			<!-- 
			Specific plugin for deployment on Sonatype Nexus server 
			( maven-deploy-plugin replaced with nexus-staging-maven-plugin )
			Keep the standard maven-deploy-plugin
			 -->
			<!-- 
			<plugin> 
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.3</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			 -->
			<plugin>
		        <groupId>org.sonatype.plugins</groupId>
		        <artifactId>nexus-staging-maven-plugin</artifactId>
		        <version>1.6.7</version> <!-- Last stable version / 2016 May -->
		        <extensions>true</extensions>
		        <configuration>
		          <!-- The server "id" element from settings to use authentication from -->
		          <serverId>ossrh</serverId>
		          <!-- nexusUrl = The Base URL of Nexus instance where we want to stage -->
		          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
		          <description>${project.artifactId}-${project.version}</description>
		        </configuration>
		        <!-- 
		        <executions>
		          <execution>
		            <id>deploy-to-sonatype</id>
		            <phase>deploy</phase>
		            <goals>
		              <goal>deploy</goal>
		              <goal>release</goal>
		            </goals>
		          </execution>
		        </executions>
		         -->
		    </plugin>
		        
		</plugins>
	</build>
  
	<dependencies>
		<!-- ========== ARTEFACT SPECIFIC DEPENDENCIES -->
		<!-- No dependencies for "commons" -->
		<!-- ========== END OF ARTEFACT SPECIFIC DEPENDENCIES -->
	
		<!-- FOR TESTS -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
		</dependency>
	
	</dependencies>

</project>