Author: manik.surtani(a)jboss.com
Date: 2007-08-15 02:17:56 -0400 (Wed, 15 Aug 2007)
New Revision: 4259
Modified:
core/trunk/README-Maven.txt
Log:
Updated README
Modified: core/trunk/README-Maven.txt
===================================================================
--- core/trunk/README-Maven.txt 2007-08-15 06:17:24 UTC (rev 4258)
+++ core/trunk/README-Maven.txt 2007-08-15 06:17:56 UTC (rev 4259)
@@ -22,7 +22,7 @@
* mvn install: will install the artifacts in your local repo for use by other projects
(such as JBoss Cache POJO edition which depends on JBoss Cache Core). Will also use
Maven's assembly plugin to build ZIP files for download (in target/distribution)
-* mvn deploy: will build and deploy the project to the JBoss snapshots repository. Note
that you should have your WebDAV username and password set up. (Deploys snapshots to
http://snapshots.jboss.org/maven2/org/jboss/cache/)
+* mvn deploy: will build and deploy the project to the JBoss snapshots repository. Note
that you should have your WebDAV username and password set up. (Deploys snapshots to
http://snapshots.jboss.org/maven2/org/jboss/cache/). If you have a non-SNAPSHOT version
number in your pom.xml, it will be deployed to the live releases repository (see below)
Setting up your WebDAV username and password to deploy project snapshots
@@ -30,6 +30,10 @@
You will also have to configure maven to use your username and password to access this
repository. For this, you will have to modify the servers section of maven settings file
($MAVEN_HOME/conf/settings.xml, or ~/.m2/settings.xml). Something similar to the following
should be added:
+<settings>
+
+...
+
<servers>
...
<server>
@@ -37,14 +41,64 @@
<username>webdav-user</username>
<password>webdav-pass</password>
</server>
+...
+
</servers>
+...
+</settings>
+
+Deploying a release to a live repository
+----------------------------------------
+
+Very simple. Make sure you have the version number in your pom.xml set to a non-SNAPSHOT
version. Maven will pick up on this and deploy to your release repository rather than the
snapshot repository.
+
+Sadly JBoss release repository cannot be accessed via WebDAV, as the snapshot repository
can. So what you need to do is:
+
+1) Check out the release repository from Subversion (svn co
https://svn.jboss.org/repos/repository.jboss.org/maven2)
+2) Add a property in ~/.m2/settings.xml to point to this 'local' copy of the
repo. (See maven settings below)
+3) Update your project's pom.xml to reflect a non-SNAPSHOT version number
+4) Deploy your project (mvn clean deploy)
+5) Check in your 'local' copy of the repo checked out in (1), adding any new
directories/files created by (4).
+
+Maven settings.xml
+------------------
+
+Working with the JBoss Cache source tree, I have configured my ~/.m2/settings.xml to look
like:
+
+<settings>
+
+ <servers>
+ <server>
+ <id>snapshots.jboss.org</id>
+ <username>MY_JBOSS_ORG_USERNAME</username>
+ <password>WONT_TELL_YOU</password>
+ </server>
+ </servers>
+
+
+ <profiles>
+ <profile>
+ <id>jboss</id>
+ <properties>
+
<maven.repository.root>/Users/manik/Code/maven2</maven.repository.root>
+ </properties>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>jboss</activeProfile>
+ </activeProfiles>
+
+</settings>
+
+
+
Integration with CruiseControl
------------------------------
CruiseControl should do the following:
-* Go into core/code
* Run "mvn clean site" - will clean and run tests, and then prepare reports.
In addition to unit tests, this project is set up to run FindBugs, PMD, jxr, and a bunch
of other code analysis tools and provide a report in target/site/project-reports.html -
which should be linked from the CruiseControl summary page.