How to deploy a GeoAPI release to a Maven 2 repository
Initial setting
Create or update yours ~/.m2/settings.xml file as below ({~} is your home directory):
<?xml version="1.0" encoding="ISO-8859-1"?> <settings> <servers> <server> <id>geotools-fr</id> <username>xxx</username> <password>xxx</password> </server> </servers> </settings>
Ask for a login and password to someone who know it (ask on the geoapi-devel mailing list if you don't know who to ask). Fill the <username> and <password> elements above accordingly (of course, keep the password secret). This need to be done only once.
Releasing a snapshot
Just invoke the following command from the trunk directory.
mvn deploy
Releasing a milestone or a final release
Choose a version number
Choose an appropriate version number. The example in this page assumes that you want to create a "GeoAPI 2.1-M0" release. The following rules must be enforced:
- Milestones and final releases must begin by a dot.dot version number, for example "2.1".
- Milestones releases (also known as alpha or beta releases) must end with "-Mx" where "x" is the milestone number (to be incremented for each milestone releases until the final release). Milestones releases are unofficial, not yet OGC approved. They are released only for testing the proposed interfaces in some implementations.
- Final releases must end with ".x" where "x" is the minor release number (to be incremented for each minor releases). GeoAPI releases must go through an OGC voting process before to be allowed to use this final version number scheme.
Examples: 2.1-M0, 2.1-M1, 2.1-M2, ..., 2.1.0, 2.1.1. Only the two last version numbers in the above list can be official GeoAPI releases.
Create a tag
- Check the current tags here:
http://geoapi.svn.sourceforge.net/svnroot/geoapi/tags/ - Figure out what the next tag will be ...
- Create a tag by copying trunk to the tags directory
svn copy https://geoapi.svn.sourceforge.net/svnroot/geoapi/trunk \ https://geoapi.svn.sourceforge.net/svnroot/geoapi/tags/2.1-M7 \ -m "Create a tag for August milestone release." - You can then check out (or switch) to this new directory
svn checkout https://geoapi.svn.sourceforge.net/svnroot/geoapi/tags/2.1-M7 release cd release
Update version numbers on the tag
Replace all occurences of "2.1-SNAPSHOT" by 2.1-M0 in all pom.xml files in the 2.1-M0 directory (not on trunk). The call to the Ant script below (the first line) do that, but you can easily perform the replacement by hand too. Commit the changes.
ant -f replaceVersions.xml svn diff svn commit -m "Fixed the version numbers."
Upload to the remote Maven repository
mvn deploy
Upload to SourceForge
(todo - not yet documented).
NOTE: Do NOT upload snapshots or milestones to SourceForge download area. Only final, OGC approved releases should appear on those FTP servers.