Affects Version/s: 0.9.9 iteration 12/02
Fix Version/s: None
M2Eclipse UI should provide a couple windows to perform maven releases. A user should be able to do it for several open projects at once.
M2eclipse users : please vote for this feature if you are interested !
We have been using Maven for 4 years now in the context of OSGi projects with many modules (typically 50+ maven projects in a SVN layout). All our maven projects are independent of each other for versions and releases (independent lifecycles), but each project of course may have dependencies to other projects.
It happens that modules are released independently (using mvn release:prepare and mvn release:perform), but it also happens that some bug fix requires to release several modules at the same time. In such case this is particularly difficult to handle for the developers: it requires to
- know the dependency graph, or have an aggregator pom, in order to know the release order
- perform the release on each of them one after the other
It would be great if m2eclipse could provide a way to right-click on any set of open maven projects in the project explorer, that would open a wizard to perform this task. The wizard could just
- display the release(tag) version and next working (trunk) version of each of the selected projects, in an editable form (default ones being the same default ones as the maven release plugin)
- provide an "advanced" button allowing the user to configure the sequence of commands (by default only mvn release:prepare + mvn release:perform, but by experience we would want to use "svn commit" + "svn up" (fixes lots of bugs in mvn release)+ "mvn compile release:prepare" + "mvn compile release:perform" (the compile phase allows for example to generate a 'year' property used in license headers).
Once the user would confirm, this would trigger the release in the right order.
Additionally a very good feature would be to
- update the eclipse .project file before each release in order to append the release version to the eclipse project name of the TAG.
- after the release, update the .project file in the trunk so that it gets its trunk name back (no version appended o the eclipse project name)
Once the projects are released, the user could be prompted to either keep the trunk projects open (to do new developments that will lead to a new release), or to remove(delete) the trunk and open the newly created tags instead. Or if the names of the projects have been properly modified according to (c), to open both.
To ease this process and in particular automatic update of inter-projects dependencies within the selected projects, I think of two possible ways:
- the m2eclipse creates a temporary aggregator pom, pre-fills the release.properties file as in http://maven.apache.org/plugins/maven-release-plugin/examples/non-interactive-release.html and perform the release on this pom. This should work fairly well because I think the maven release plugin handles all cross-projects dependency versions updates pretty well in such case.
- If 1. does not work for some reason, the plugin could use maven reactor to get the right release order, and then release all projects one after the other. Before releasing projects 2 to n, it would need to use the "versions maven plugin" in order to update the pom with the potential new dependency version ( http://mojo.codehaus.org/versions-maven-plugin/use-latest-versions-mojo.html with the option "includes" set to the list of artifactIds of the selected projects)
Is there any roadmap for such a feature ?