On 13-May-09, at 8:55 AM, sebb wrote:
What I would like to be able to do with Maven is: Create an SVN tag, e.g. myproject-0.9-RC1 from current code in trunk (or perhaps a branch)
Sure standard release:prepare from a trunk or more likely a branch. For Maven itself we always use a branch, but for plugins because they are released more frequently the trunk suffices.
Create and test the release candidate from the tag. Publish the release candidate somewhere temporarily so others can check if the release candidate is OK.
For Maven we're using Nexus so you would do a standard release:perform and our configurations are setup to publish to a Nexus staging repository. The artifacts are visible to any group you like. The typical scenario is that a build is published for validation by QA but the artifacts are not visible to the general developer population.
If there are problems, fix the trunk (or branch) and create a new tag, e.g. myproject-0.9-RC2. Repeat as needed.
If you find the build is not good then you drop the staged repository and nuke the tag (this will be automated at some point but the release:rollback doesn't work).
Suppose RC3 is OK, then the artifacts need to be renamed (if necessary) to remove the -RC3 suffix, and published to the release repository. The tag is also renamed, i.e. myproject-0.9-RC3 => myproject-0.9 The end result is a published release (without RC suffix).
You don't ever change anything about the validated artifact. To adhere to release management best practices signatures, names and coordinates cannot change for anyone who might have used the artifacts. The way QA people have tested it should be exactly the same as everyone else will use it. Changing the coordinate can introduce too much variation and potential problems.
The idea behind this flow is that it's very convenient to test what might be published and drop/promote repositories as they are validated. While the artifacts are being validated they don't pollute any production repositories. When validation is complete the repository is promoted Nexus internally manages the configuration so that the artifacts become visible to the general population. And at Apache this additionally means promoting to Maven central.
The idea behind this is to ensure that the tag URL alone is sufficient to identify the exact contents used to create the release, and that the artifacts that are published are identical to the ones that were checked (apart perhaps from the file names).
Nothing can change about the release. It completely invalidates all testing. We could tighten up the management of the SVN URL management as nothing in SVN provides a guarantee of the contents of a tag at one point in time versus another. But in practice this not really a big problem. If you drop a repository that failed validation you have to go nuke the tag. Not really a big deal and we can fully automate this eventually.
Is this possible using Maven? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl http://twitter.com/SonatypeNexus http://twitter.com/SonatypeM2E ---------------------------------------------------------- A party which is not afraid of letting culture, business, and welfare go to ruin completely can be omnipotent for a while. -- Jakob Burckhardt --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
