Testing with a clean repository
It is important to test source builds using a clean repository. No need to rm -rf ~/.m2/repository. Simply supply -Dmaven.repo.local=/path/to/temp/dir as a Maven command line option. For example:
mvn -Dmaven.repo.local=/tmp/clean-m2-repo install
mvn -Dmaven.repo.local=/tmp/clean-m2-repo pluto:install -DinstallDir=/path/to/tomcat
You need to remember to supply -Dmaven.repo.local=/tmp/clean-m2-repo on each invocation of the mvn command.
Building releases for local testing
If you are wanting to tag a release, see [Pluto/CuttingRelease]. Only committers will be able to successfully cut a release.
Anyone, however, can build releases for local testing. First checkout a copy of the code from SVN, then:
From the base source directory run: mvn package
cd assembly
mvn -Passembly,build-assemblies assembly:assembly
Distributions will be in target/assembly/out/
esm:~/src/pluto-1.1.x$ ls -l assembly/target/assembly/out/ total 102976 -rw-r--r-- 1 esm esm 3960558 Jul 14 15:12 pluto-1.1.4-SNAPSHOT-bin.tar.bz2 -rw-r--r-- 1 esm esm 3948181 Jul 14 15:12 pluto-1.1.4-SNAPSHOT-bin.tar.gz -rw-r--r-- 1 esm esm 3949669 Jul 14 15:12 pluto-1.1.4-SNAPSHOT-bin.zip -rw-r--r-- 1 esm esm 12130891 Jul 14 15:13 pluto-1.1.4-SNAPSHOT-bundle.tar.bz2 -rw-r--r-- 1 esm esm 12445076 Jul 14 15:12 pluto-1.1.4-SNAPSHOT-bundle.tar.gz -rw-r--r-- 1 esm esm 13255012 Jul 14 15:13 pluto-1.1.4-SNAPSHOT-bundle.zip -rw-r--r-- 1 esm esm 220041 Jul 14 15:12 pluto-1.1.4-SNAPSHOT-container-bin.tar.bz2 -rw-r--r-- 1 esm esm 222348 Jul 14 15:12 pluto-1.1.4-SNAPSHOT-container-bin.tar.gz -rw-r--r-- 1 esm esm 222580 Jul 14 15:12 pluto-1.1.4-SNAPSHOT-container-bin.zip -rw-r--r-- 1 esm esm 2347132 Jul 14 15:12 pluto-1.1.4-SNAPSHOT-src.zip esm:~/src/pluto-1.1.x$
Using the staging Maven 2 repository
When binaries are released for a vote, you might want to access the binaries that are put up on the Pluto Maven 2 staging repository. I've added the following profile to ~/.m2/settings.xml
<profile>
<id>pluto-test</id>
<repositories>
<repository>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
<id>pluto-staging</id>
<name>Apache Pluto Staging Repository</name>
<url>
http://people.apache.org/builds/portals-pluto/m2-staging-repository
</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
<id>pluto-staging</id>
<name>Apache Pluto Staging Repository</name>
<url>
http://people.apache.org/builds/portals-pluto/m2-staging-repository
</url>
</pluginRepository>
</pluginRepositories>
</profile>When it is time to test the build, I can activate the profile by calling mvn -Ppluto-test, and use the actual binaries being voted on for release.
Furthermore, to test a build with a clean repo, you can supply -Dmaven.repo.local=/path/to/temp/dir as a Maven command line option. Maven will use /path/to/temp/dir as its repository.
Deploying Snaphots (for committers)
To deploy SNAPSHOTs to the Maven 2 repository
1. You need some secret sauce in your ~/.m2/settings.xml:
<settings>
<servers>
...
<server>
<id>apache.snapshots</id>
<username>jsmith</username>
<privateKey>/path/to/jsmiths/private/key</privateKey>
<passphrase/>
</server>
...
</servers>
</settings>The private key is the same private key that you would use when sshing into people.apache.org. You can test public key auth by setting up PuTTY or OpenSSH (see http://www.apache.org/dev/user-ssh-windows.html).
2. Run mvn deploy You should see output like
esm:~/src/pluto$ mvn deploy [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Apache Pluto [INFO] Pluto Descriptor Service API [INFO] Pluto Descriptor Service Implementation [INFO] Pluto Portlet Container [INFO] Pluto Portlet Tag Library [INFO] Pluto Portal Driver [INFO] Pluto Portal Driver Implementation Classes [INFO] Pluto Portal [INFO] Pluto Utilities [INFO] Maven Pluto Installer Plugin [INFO] Pluto Testsuite Portlet [INFO] Pluto Ant Tasks [INFO] Pluto Website Documentation [INFO] Pluto Website Skin [INFO] ---------------------------------------------------------------------------- [INFO] Building Apache Pluto [INFO] task-segment: [deploy] [INFO] ---------------------------------------------------------------------------- ... snip, snip ... [INFO] Retrieving previous metadata from apache.snapshots [INFO] Uploading repository metadata for: 'snapshot org.apache.pluto:pluto-site-skin:1.2.0-SNAPSHOT' [INFO] Retrieving previous metadata from apache.snapshots [INFO] Uploading project information for pluto-site-skin 1.2.0-20071010.125326-2 [INFO] Retrieving previous metadata from apache.snapshots [INFO] Uploading repository metadata for: 'artifact org.apache.pluto:pluto-site-skin' [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] Apache Pluto .......................................... SUCCESS [20.688s] [INFO] Pluto Descriptor Service API .......................... SUCCESS [25.590s] [INFO] Pluto Descriptor Service Implementation ............... SUCCESS [22.082s] [INFO] Pluto Portlet Container ............................... SUCCESS [22.469s] [INFO] Pluto Portlet Tag Library ............................. SUCCESS [23.149s] [INFO] Pluto Portal Driver ................................... SUCCESS [24.124s] [INFO] Pluto Portal Driver Implementation Classes ............ SUCCESS [23.044s] [INFO] Pluto Portal .......................................... SUCCESS [28.587s] [INFO] Pluto Utilities ....................................... SUCCESS [27.698s] [INFO] Maven Pluto Installer Plugin .......................... SUCCESS [27.476s] [INFO] Pluto Testsuite Portlet ............................... SUCCESS [28.262s] [INFO] Pluto Ant Tasks ....................................... SUCCESS [20.874s] [INFO] Pluto Website Documentation ........................... SUCCESS [19.754s] [INFO] Pluto Website Skin .................................... SUCCESS [23.839s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5 minutes 39 seconds [INFO] Finished at: Wed Oct 10 08:59:01 EDT 2007 [INFO] Final Memory: 20M/37M [INFO] ------------------------------------------------------------------------ esm:~/src/pluto$
3. Next, you have to ssh into people.apache.org and update the permissions of the deployed snapshots. Otherwise permission conflicts may prevent your colleagues from publishing snapshots at a later date.
[esm@minotaur ~]$ cd /www/people.apache.org/repo/m2-snapshot-repository/org/apache/pluto [esm@minotaur /www/people.apache.org/repo/m2-snapshot-repository/org/apache/pluto]$ find . -type f | xargs chmod g+rw [esm@minotaur /www/people.apache.org/repo/m2-snapshot-repository/org/apache/pluto]$ find . -type d | xargs chmod g+rwx