<?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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<groupId>net.sourceforge.reqtracer</groupId>
	<artifactId>jrt</artifactId>
	<packaging>pom</packaging>
	<name>JavaRequirementsTracer root pom</name>
	<version>1.7.0</version><!--Version marker. Do not remove/modify this comment!!!-->
	<description>Requirements Tracer for Java code based on annotations</description>
	<url>http://reqtracer.sourceforge.net</url>

	<modules>
		<module>jrt-annotations</module>
		<module>jrt-reporter</module>
		<module>jrt-maven-plugin</module>
		<module>jrt-system-test</module>
		<module>jrt-system-test-no-spring</module>
	</modules>
	
	<properties>
		<!--  Versions. -->
		<assembly.plugin.version>2.2-beta-2</assembly.plugin.version> <!-- TODO beta-5 does not handle dependencies correctly locally (scope compile does not override parent scope provided). -->
		<buildnumber.plugin.version>1.0-beta-1</buildnumber.plugin.version>
		<compiler.plugin.version>2.3</compiler.plugin.version>
		<eclipse.plugin.version>2.8</eclipse.plugin.version>
		<gpg.plugin.version>1.1</gpg.plugin.version>
		<jar.plugin.version>2.3</jar.plugin.version>
		<javac.version>1.5</javac.version>
		<javadoc.plugin.version>2.7</javadoc.plugin.version>
		<junit.version>4.4</junit.version>
		<release.plugin.version>2.0</release.plugin.version>
		<resources.plugin.version>2.4.2</resources.plugin.version>
		<source.plugin.version>2.1.2</source.plugin.version>
		<spring.version>2.5.5</spring.version>
		<surefire.plugin.version>2.5</surefire.plugin.version>
		<versions.plugin.version>1.2</versions.plugin.version>
		<!-- Other. -->
		<scm.base.url>https://reqtracer.svn.sourceforge.net/svnroot/reqtracer</scm.base.url>
	</properties>
	
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Ronald Koster</name>
		</developer>
		<developer>
			<name>Ruud de Jong</name>
		</developer>
		<developer>
			<name>Marcel Cullens</name>
		</developer>
	</developers>

	<scm>
		<connection>scm:svn:https://reqtracer.svn.sourceforge.net/svnroot/reqtracer</connection>
		<developerConnection>scm:svn:https://reqtracer.svn.sourceforge.net/svnroot/reqtracer</developerConnection>
		<url>https://reqtracer.svn.sourceforge.net/svnroot/reqtracer</url>
	</scm>
	
	<distributionManagement>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Sonatype Nexus Staging Repository</name>
			<url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshot Repository</name>
			<url>http://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${surefire.plugin.version}</version>
					<configuration>
						<testFailureIgnore>true</testFailureIgnore>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-eclipse-plugin</artifactId>
					<version>${eclipse.plugin.version}</version>
					<configuration>
						<!-- buildOutputDirectory>bin</buildOutputDirectory-->
						<useProjectReferences>false</useProjectReferences>
						<!-- downloadSources>true</downloadSources>
						<downloadJavadocs>true</downloadJavadocs-->
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${compiler.plugin.version}</version>
				<configuration>
					<source>${javac.version}</source>
					<target>${javac.version}</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<!--  Publish source jars also. -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${source.plugin.version}</version>
				<executions>
					<execution>
						<id>source-jar</id>
						<goals>
							<goal>jar</goal>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!--  Publish javadoc jars also. -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${javadoc.plugin.version}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
				<executions>
					<execution>
						<id>javadoc-jar</id>
						<goals>
							<goal>jar</goal>
							<!-- <goal>test-jar</goal> -->
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>${assembly.plugin.version}</version>
				<configuration>
					<descriptors>
						<descriptor>src/main/assembly/sources.xml</descriptor>
					</descriptors>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<version>${buildnumber.plugin.version}</version>
				<configuration>
					<doCheck>false</doCheck>
					<doUpdate>false</doUpdate>
				</configuration>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${jar.plugin.version}</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Implementation-Build>${buildNumber}</Implementation-Build>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>${resources.plugin.version}</version>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${release.plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>${versions.plugin.version}</version>
				<configuration>
					<generateBackupPoms>false</generateBackupPoms>
				</configuration>
			</plugin>
		</plugins>
	</build>
		
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	
	<profiles>
		<profile>
			<!-- See also: + http://www.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven
			               + http://maven.apache.org/guides/mini/guide-central-repository-upload.html
			               + http://nexus.sonatype.org/oss-repository-hosting.html
			               
			     NB.1. An alternative for 'mvn release:prepare' is:
			     	+ Run 'mvn versions:set  -DnewVersion=M.m.f'
					  With M, m and f the new numbers.
			     	+ Use your SCM client to create the tag and commit the changes manually.
			     	+ See also src/main/scripts/
			               
			     NB.2. 'mvn release:perform' may hang at the gpg:sign invokation. Work around:
			         + Manually check out tag concerned from SCM.
			         + In the tag dir: Run 'mvn deploy -P sign-artifacts'. 
			         + In the trunk dir: Run 'mvn release:clean' (if needed). 
			-->
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${gpg.plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>sign-artifacts</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${gpg.plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>local-deployer</id>
		    	<distributionManagement>
				<repository>
					<id>local-staging-repo</id>
					<name>Local Staging Repo</name>
					<url>file://${local.deploy.dir}/m2-repo</url>
				</repository>
				<snapshotRepository>
					<id>local-snapshot-repo</id>
					<name>Local Snapshot Repo</name>
					<url>file://${local.deploy.dir}/m2-repo</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
	</profiles>
    
</project>
