Best Practices

We use the Versioning system to define new versions for our projects.

Project Set Up

After adding the basic configuration to the settings.xml and the pom.xml, call

mvn bugzilla:addProduct

To add the major, minor and micro milestones:

mvn bugzilla:initMilestones -DreleasedVersion=SNAPSHOT

The new project has a Bugzilla product created where the milestones 1.0.0, 0.2.0, and 0.1.0 are added, as well as the version 0.1.0-SNAPSHOT.

[INFO] Successful login to Bugzilla.
[INFO] Version '0.1.0-SNAPSHOT' already existed.
[INFO] Milestone '0.1.0' already existed.
[INFO] Milestone '0.2.0' has been created.
[INFO] Milestone '1.0.0' has been created.
[INFO] Successful logout from Bugzilla.

For convenience there is a goal to run these to steps with one single call:

mvn bugzilla:init

Release

The release of a project demands to add the version of the currently released project and to set the new milestone versions.

First update the default milestone:

mvn bugzilla:updateProduct

We want to provide a milestone for the next major, minor and micro releases to be able to add new features that break existing API, add new features without breaking existing API and add issues as bug fixes. We run (with releasedVersion set to the last released version):

mvn bugzilla:initMilestones -DreleasedVersion=0.1.0

This will create the following output (assuming that after the successful release the version in the POM is set to 0.1.1-SNAPSHOT):

[INFO] Successful login to Bugzilla.
[INFO] Version '0.1.0' has been created.
[INFO] Milestone '0.1.1' already existed.
[INFO] Milestone '0.2.0' already existed.
[INFO] Milestone '1.0.0' already existed.
[INFO] Successful logout from Bugzilla.

For convenience there is a goal to run these to steps with one single call:

mvn bugzilla:sync -DreleasedVersion=0.1.0

Release Notes

If you want to include release notes for your product you may want to have a look at the maven-issues-plugin.