<!-- 

This pom.xml has been configured with the following dependencies:

1.) gpg.exe needs to be installed on your system - you can specify the path to gpg.exe as follows:
    
    mvn deploy -Dgpg.executable="C:\Program Files\GNU\GnuPG\gpg.exe"
    mvn release:prepare release:perform -Dusername="<insert svn username here>" -Dpassword="<insert svn password here>" -Darguments="-Dgpg.executable=C:\\Program Files\\GNU\\GnuPG\\gpg.exe"

2.) Our Maven settings.xml contains the credentials for: accessing SCM; running GPG; site deployment to SourceForge; and deploying to repositories (both our local SNAPSHOT repository and Sonatype.org's staging repository), e.g.

<settings>
  <servers>
    <server>
      <id>snapshots</id>
      <username>-insert username here-</username>
      <password>-insert password here-</password>
    </server>
    <server>
      <id>release-sonatype</id>
      <username>-insert username here-</username>
      <password>-insert password here-</password>
    </server>
    <server>
      <id>sourceforge.net</id>
      <username>-insert username here-</username>
      <password>-insert password here-</password>
    </server>
  </servers>
  <profiles>
    <profile>
      <id>activeProfile</id>
      <properties>
        <scm.username>-insert username here-</scm.username>
        <scm.password>-insert password here-</scm.password>
        <gpg.keyname>-insert keyname here-</gpg.keyname>
        <gpg.passphrase>-insert passphrase here-</gpg.passphrase>
      </properties>
    </profile>
  </profiles>
  <activeProfiles>
     <activeProfile>activeProfile</activeProfile>
  </activeProfiles>
</settings>

-->
<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.andspidclient</groupId>
	<artifactId>ands-pid-client</artifactId>
	<packaging>jar</packaging>
	<version>1.0.03</version>
	<name>ands-pid-client</name>
	<description>A generic client library for accessing the ANDS Persistent Identifier service. See the Javadoc report for full details on usage.</description>
	<url>http://andspidclient.sourceforge.net/</url>
  <issueManagement>
    <system>SourceForge Trac</system>
    <url>https://sourceforge.net/apps/trac/andspidclient/</url>
  </issueManagement>
	<scm>
	   <connection>scm:svn:https://andspidclient.svn.sourceforge.net/svnroot/andspidclient/tags/ands-pid-client-1.0.03</connection>
	   <developerConnection>scm:svn:https://andspidclient.svn.sourceforge.net/svnroot/andspidclient/tags/ands-pid-client-1.0.03</developerConnection>
	   <url>http://andspidclient.svn.sourceforge.net/viewvc/andspidclient/tags/ands-pid-client-1.0.03</url>
	</scm>
	<distributionManagement>
		<site>
		  <id>sourceforge.net</id>
		  <url>scp://shell.sourceforge.net/home/groups/a/an/andspidclient/htdocs</url>
		</site>
		<repository>
      <id>release-sonatype</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> <!-- sonatype.org repository for staging releases  -->
    </repository>
		<snapshotRepository>
			<id>snapshots</id>
			<url>http://junk-yf:8085/nexus/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	<properties>
		<targetJdk>1.5</targetJdk>
		<jar.outputDirectory>
			${project.build.directory}
		</jar.outputDirectory>
	</properties>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>src/main/resources/LICENSE.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>
	<mailingLists>
    <mailingList>
      <name>Project SVN Changes Notification List</name>
      <subscribe>https://lists.sourceforge.net/mailman/listinfo/andspidclient-commit-svn</subscribe>
      <unsubscribe>https://lists.sourceforge.net/mailman/listinfo/andspidclient-commit-svn</unsubscribe>
      <archive>https://sourceforge.net/mailarchive/forum.php?forum_name=andspidclient-commit-svn</archive>
      <post>andspidclient-commit-svn@lists.sourceforge.net</post>
    </mailingList>
    <mailingList>
      <name>Project Users List</name>
      <subscribe>https://lists.sourceforge.net/mailman/listinfo/andspidclient-users</subscribe>
      <unsubscribe>https://lists.sourceforge.net/mailman/listinfo/andspidclient-users</unsubscribe>
      <archive>https://sourceforge.net/mailarchive/forum.php?forum_name=andspidclient-users</archive>
      <post>andspidclient-users@lists.sourceforge.net</post>
    </mailingList>    
  </mailingLists>
	
	<build>
		<plugins>
		
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			
      <!--
        Add or update existing license headers, see: http://code.google.com/p/maven-license-plugin/wiki/Configuration
      --> 
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <header>config/header.txt</header>
          <excludes>
            <exclude>src/main/resources/LICENSE.txt</exclude>
            <exclude>src/main/resources/NOTICE.txt</exclude>
          </excludes>
        </configuration>
      </plugin>			
			
      <!--
        Generate source jar as a build artifacts
      -->			
			<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!--
        Generate javadoc jar as a build artifacts
      -->			
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.6</version>
        <executions>
	        <execution>
	          <id>generate-javadoc</id> 
            <phase>package</phase>
		        <goals>
		          <goal>jar</goal>
		        </goals> 
	        </execution>
        </executions> 
      </plugin>

      <!--  WE NOW PERFORM A MANUAL FILE RELEASE TO SOURECFORGE --> 
      <!--  Include the created software artifacts in the site  -->
      <!-- 
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.1</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>pre-site</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/site/downloads</outputDirectory>
              <resources>
                <resource>
                  <directory>target</directory>
                  <includes>
                    <include>ands-pid-client-*.zip</include>
                    <include>ands-pid-client-*.jar</include>
                  </includes>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      -->
      
      <!-- This configures the scm plugin. note: the variables ${scm.username} and ${scm.password} are retrieved from local file: settings.xml  -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-plugin</artifactId>
        <version>1.3</version>
        <configuration>
          <username>${scm.username}</username>
          <password>${scm.password}</password>
        </configuration>
      </plugin>
      
      <!-- This is a simple debug statement. note: the variables ${scm.username} and ${scm.password} are retrieved from local file: settings.xml  -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <phase>deploy</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <echo>Using SCM credentials</echo>
                <echo>[scm.username] ${scm.username}</echo>
                <echo>[scm.password] ${scm.password}</echo>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
      <!-- WE NOW PERFORM A MANUAL SITE DEPLOY TO SOURECFORGE -->
      <!-- Run script to create SourceForge shell so that site can be uploaded via SCP  -->
      <!--
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>create_shell_on_sourceforge</id>
            <phase>pre-site</phase>
            <goals>
              <goal>exec</goal>
            </goals>
		        <configuration>
		          <arguments>
		            <argument>-ssh</argument>
		            <argument>-pw</argument> 
		            <argument>${scm.password}</argument>
		            <argument>-P</argument>
		            <argument>22</argument>
		            <argument>${scm.username},andspidclient@shell.sourceforge.net</argument>
		            <argument>create</argument>
		          </arguments>
		        </configuration>
          </execution>
          <execution>
            <id>change_htdocs_ownership</id>
            <phase>pre-site</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <arguments>
                <argument>-ssh</argument>
                <argument>-pw</argument> 
                <argument>${scm.password}</argument>
                <argument>-P</argument>
                <argument>22</argument>
                <argument>${scm.username},andspidclient@shell.sourceforge.net</argument>
                <argument>chown ${scm.username} /home/groups/a/an/andspidclient/htdocs</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      -->
      
      <!-- 2.0-beta-9 used to overcome bug when tagging a release (http://jira.codehaus.org/browse/SCM-406)  -->
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0-beta-9</version>
        <configuration>
          <goal>deploy</goal> <!-- Because we have a populated <site> element, the site-deploy goal will execute. We specify that only the deploy goal should execute, since we will perform site-deploys manually -->
        </configuration>        
      </plugin>
      
      <!--  This will sign the artifacts before being deployed to the release repository. note: the variables ${gpg.keyname} and ${gpg.passphrase} are retrieved from local file: settings.xml  -->
      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-gpg-plugin</artifactId>
         <configuration>
           <keyname>${gpg.keyname}</keyname>
           <passphrase>${gpg.passphrase}</passphrase>
         </configuration>
         <executions>
           <execution>
             <id>sign-artifacts</id>
             <phase>verify</phase>
             <goals>
               <goal>sign</goal>
             </goals>
           </execution>
         </executions>
      </plugin>

    </plugins>
  </build>

	<ciManagement>
		<system>hudson</system>
		<url>http://junk-yf:8082/</url>
		<notifiers>
			<notifier>
				<type>mail</type>
				<configuration>
					<recipients>dem040@csiro.au</recipients>
					<sendOnError>true</sendOnError>
					<sendOnFailure>true</sendOnFailure>
					<sendOnSuccess>true</sendOnSuccess>
					<sendOnWarning>true</sendOnWarning>
				</configuration>
			</notifier>
		</notifiers>
	</ciManagement>

	<!--
		We don't package the dependencies (i.e. a \lib directory) in the jar,
		the pom.xml should tell consumers about any dependencies (i.e. the
		transitive dependencies)
	-->

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
			<version>3.1</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.15</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.4</version>
		</dependency>
	</dependencies>
	<reporting>
		<plugins>
			<plugin>
				<artifactId>maven-changelog-plugin</artifactId>
				<version>2.1</version>
				<configuration>
					<type>range</type>
					<range>60</range>
				</configuration>
			</plugin>
			<!-- Maven changes plugin does not currently support SourceForge's Trac -->
			<!-- 
			<plugin>
				<artifactId>maven-changes-plugin</artifactId>
				<version>2.1</version>
				<reportSets>
					<reportSet>
						<reports>
			       <report>changes-report</report>
						</reports>
					</reportSet>
				</reportSets>
				<configuration>
          <issueLinkTemplate>
             %URL%/ticket/%ISSUE%
          </issueLinkTemplate>
				</configuration>
			</plugin>
			-->
			<plugin>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<configLocation>config/checkstyle_checks.xml</configLocation>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.6</version>
			</plugin>
			<plugin>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>2.1</version>
			</plugin>
			<plugin>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<targetJdk>${targetJdk}</targetJdk>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>2.4.3</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.3</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jdepend-maven-plugin</artifactId>
				<version>2.0-beta-2</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>taglist-maven-plugin</artifactId>
				<version>2.3</version>
			</plugin>
		</plugins>
	</reporting>
    <developers>
        <developer>
            <id>dem040</id>
            <name>James Dempsey</name>
            <email>dem040@csiro.au</email>
            <organization>CSIRO</organization>
            <timezone>+11</timezone>
        </developer>
        <developer>
            <id>che256</id>
            <name>Rita Chen</name>
            <email>che256@csiro.au</email>
            <organization>CSIRO</organization>
            <timezone>+11</timezone>
        </developer>
        <developer>
            <id>pie046</id>
            <name>Martin Pienaar</name>
            <email>pie046@csiro.au</email>
            <organization>CSIRO</organization>
            <timezone>+10</timezone>
        </developer>
        <developer>
            <id>bri26e</id>
            <name>Robert Bridle</name>
            <email>bri26e@csiro.au</email>
            <organization>CSIRO</organization>
            <timezone>+11</timezone>
        </developer>
    </developers>
</project>
