<?xml version="1.0"?>
<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>eu.eu-emi.security</groupId>
	<artifactId>canl</artifactId>
	<packaging>jar</packaging>
	<version>1.1.0</version>
	<name>canl</name>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<description>EMI Common X.509 Authentication Library</description>
	<inceptionYear>2012</inceptionYear>
	<organization>
		<name>European Middleware Initiative</name>
		<url>http://www.eu-emi.eu</url>
	</organization>
	<url>http://www.eu-emi.eu</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<exec.maven.plugin.version>1.2.1</exec.maven.plugin.version>
		<docman.enabled />
		<doc.template>emi-nonunicore</doc.template>
	</properties>


	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/eu-emi/canl-java/issues</url>
	</issueManagement>

 
	<developers>
		<developer>
			<name>Krzysztof Benedyczak</name>
			<organization>ICM Warsaw University</organization>
			<organizationUrl>http://www.icm.edu.pl</organizationUrl>
		</developer>
	</developers>
	
	<contributors>
		<contributor>
			<name>Joni Hahkala</name>
			<organization>Helsinki Institute of Physics/CERN</organization>
			<organizationUrl>http://cern.ch</organizationUrl>
		</contributor>
		<contributor>
			<name>Vincenzo Ciaschini</name>
			<organization>INFN-CNAF</organization>
			<organizationUrl>http://www.cnaf.infn.it</organizationUrl>
		</contributor>
	</contributors>

	<licenses>
		<license>
			<name>BSD</name>
			<comments>License file is distributed with the binary and source packages.</comments>
		</license>
	</licenses>

	<mailingLists>
		<mailingList>
			<name>Development and planning (requires signing-in)</name>
			<subscribe>http://mail.eu-emi.eu/mailman/listinfo/emi-jra1-sec-authn</subscribe>
			<unsubscribe>http://mail.eu-emi.eu/mailman/listinfo/emi-jra1-sec-authn</unsubscribe>
			<archive>http://mail.eu-emi.eu/mailman/private/emi-jra1-sec-authn</archive>
		</mailingList>
	</mailingLists>

	<prerequisites>
		<maven>2.2.1</maven>
	</prerequisites>

	<scm>
		<connection>scm:git:git://github.com/eu-emi/canl-java.git</connection>
		<url>https://github.com/eu-emi/canl-java</url>
		<developerConnection>scm:git:ssh://git@github.com/eu-emi/canl-java.git</developerConnection>
	</scm>
	
	<distributionManagement>
		<!-- where the website is deployed -->
		<site>
			<id>unicore.eu</id>
			<url>dav:https://unicore-dev.zam.kfa-juelich.de/documentation/canl-${project.version}</url>
		</site>
		<snapshotRepository>
			<id>unicore.eu</id>
			<name>UNICORE SNAPSHOT Repository</name>
			<url>dav:https://unicore-dev.zam.kfa-juelich.de/maven</url>
		</snapshotRepository>
	</distributionManagement>
	
	    
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcmail-jdk16</artifactId>
			<version>1.46</version>
			<scope>test</scope>
		</dependency>
		
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk16</artifactId>
			<version>1.46</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>1.4</version>
		</dependency>
	</dependencies>


	<build>
		<!-- Allows to deploy with dav:// with Maven 3. Note that newer versions
		of this extension do not work with Maven 2.2 -->
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-webdav-jackrabbit</artifactId>
				<version>1.0</version>
			</extension>
		</extensions>
	
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<inherited>true</inherited>
				<executions>
					<execution>
						<id>build-source-jar</id>
						<phase>verify</phase>
						<!-- makes sure the source jar is build before install or compile -->
						<goals>
							<goal>jar</goal>
						</goals>
						<inherited>true</inherited>
					</execution>
				</executions>
				<configuration>
					<attach>true</attach>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<detectLinks />
					<links>
						<link>http://www.bouncycastle.org/docs/docs1.6/</link>
					</links>
				</configuration>
				<inherited>true</inherited>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
			<!-- workaround for gnupg hanging while invoked from the release plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.2.2</version>
				<configuration>
					<mavenExecutorId>forked-path</mavenExecutorId>
				</configuration>
			</plugin>
			
			<!-- Usage of asciidoc to create documentation -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>${exec.maven.plugin.version}</version>
				<executions>
					<execution>
						<id>svn</id>
						<phase>pre-site</phase>
						<configuration>
							<executable>svn</executable>
							<arguments>
								<argument>export</argument>
								<argument>https://unicore.svn.sourceforge.net/svnroot/unicore/tools/docman/trunk</argument>
								<argument>target/docman</argument>
								<argument>--force</argument>
							</arguments>
						</configuration>
						<goals>
							<goal>exec</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<id>run</id>
						<phase>pre-site</phase>
						<configuration>
							<target>
								<property name="doc.relversion" value="${project.version}" />
								<ant antfile="${basedir}/target/docman/doc-build.xml" />
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>2.3.2</version>
					<configuration>
						<source>1.6</source>
						<target>1.6</target>
						<maxmem>256M</maxmem>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.3.2</version>
					<configuration>
						<finalName>${project.name}-${project.version}</finalName>
						<archive>
							<manifestEntries>
								<Specification-Title>${project.name}</Specification-Title>
								<Specification-Vendor>${project.organization.name}</Specification-Vendor>
								<Specification-Version>${project.version}</Specification-Version>
								<Implementation-Title>${project.name}</Implementation-Title>
								<Implementation-Vendor-Id>${project.organization.url}</Implementation-Vendor-Id>
								<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
								<Implementation-Version>${project.version}</Implementation-Version>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<detectLinks />
					<links>
						<link>http://www.bouncycastle.org/docs/docs1.6/</link>
					</links>
				</configuration>
				<reportSets>
					<reportSet>
						<id>default</id>
						<reports>
							<report>javadoc</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.5.1</version>
				<configuration>
					<instrumentation>
						<excludes>
							<exclude>eu/emi/security/authn/x509/helpers/pkipath/bc/*.class</exclude>
						</excludes>
					</instrumentation>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>javancss-maven-plugin</artifactId>
				<version>2.0</version>
				<configuration>
					<excludes>
						<exclude>**/eu/emi/security/authn/x509/helpers/pkipath/bc/*.java</exclude>
					</excludes>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.4</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>summary</report>
							<report>project-team</report>
							<report>mailing-list</report>
							<report>issue-tracking</report>
							<report>license</report>
							<report>scm</report>
							<report>dependencies</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
		</plugins>
	</reporting>
	
	<profiles>
		<!-- Profile which allows for using the rpm/deb packaging tool -->
		<profile>
			<id>packman</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>${exec.maven.plugin.version}</version>
						<executions>
							<execution>
								<id>svn </id>
								<phase>package</phase>
								<configuration>
									<executable>svn</executable>
									<arguments>
										<argument>export</argument>
										<argument>https://unicore.svn.sourceforge.net/svnroot/unicore/tools/packaging_tools/trunk/packman</argument>
										<argument>target/package</argument>
										<argument>--force</argument>
									</arguments>
								</configuration>
								<goals>
									<goal>exec</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>run</id>
								<phase>package</phase>
								<configuration>
									<target>
										<ant antfile="${basedir}/target/package/main.xml">
											<target name="main" />
										</ant>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
						<!-- TODO: required currently on Debian 6 (??) -->
						<dependencies>
							<dependency>
								<groupId>org.apache.maven.wagon</groupId>
								<artifactId>wagon-http</artifactId>
								<version>2.0</version>
							</dependency>
						</dependencies> 
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>	
</project>
