Maven has a release mechanism which performs the following steps automatically in the "prepare" phase:
- Checks if you have any dependencies to SNAPSHOTS.
- Checks if you have all your source code committed.
- Checks if the project to be released is a SNAPSHOT.
- Removes the SNAPSHOT and checks the code to compile, package and test
- Commits the version and tags it.
- Updates the version to a new SNAPSHOT version and commits this.
It then does the following in the "release" phase:
- Checks out the tag, which was created in the "prepare" phase.
- Compiles, package and test.
- Creates the site including javadoc.
- Deploys the jar, the javadoc and the sources
- Deploys the site.
To do the above, follow the steps below:
- Make sure you have ssh'd to svn.freehep.org at least once to set up the ssh keys and/or an ssh-agent.
- Make sure you have no SNAPSHOT dependencies and make sure you have committed your code.
- Run prepare phase:
NOTE: these goals do not work in mevenide, they have to be done from the command line.
NOTE on WINDOWS: You need to set up hacked versions of ssh and scp on windows. I have them in c:\tony\projects\sshhack.