<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-web</artifactId>
	<version>0.8.3</version>

	<name>NanoJ Web</name>
	<description>NanoJ web framework classes</description>
	<!-- ========== END OF ARTEFACT IDENTIFICATION -->

	<!-- Distribution Management configuration (used by the deploy plugin) -->
	<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>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</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>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</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 -->
			<plugin>
				<groupId>org.kohsuke</groupId>
				<artifactId>pgp-maven-plugin</artifactId>
				<version>1.1</version>
				<configuration>
					<skip>${skip-pgp}</skip>
					<secretkey>keyfile:${secretkey-file}</secretkey>
					<passphrase>file:${passphrase-file}</passphrase>
				</configuration>				
				<executions>
					<execution>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
			<!-- 
			Specific plugin for deployment on Sonatype Nexus server 
			( maven-deploy-plugin replaced with nexus-staging-maven-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>
		    </plugin>
    
		</plugins>
	</build>
  
	<dependencies>
		<!-- ========== ARTEFACT SPECIFIC DEPENDENCIES -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>
 
		<dependency>
			<groupId>org.nanoj</groupId>
			<artifactId>nanoj-injector</artifactId>
			<version>0.8.3</version>
		</dependency>
		
		<dependency>
			<groupId>org.thymeleaf</groupId>
			<artifactId>thymeleaf</artifactId>
			<version>2.1.4.RELEASE</version>
		</dependency>
		<!-- ========== END OF ARTEFACT SPECIFIC DEPENDENCIES -->
	
		<!-- FOR TESTS -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
		</dependency>
	
	</dependencies>

</project>