So just to make sure I understand your setup correctly: You check your master build for âwrongâ versions, with the maintenance stream being the baseline. Correct?
If yes, assume the following scenario: master and maintenance stream produce artifacts with the same version and content, so the master version is not âwrongâ.
Now the maintenance version is incremented. However this entails that building the same sources in master would now fail. This doesnât seem desired, or is it?
[mailto:tycho-dev-bounces@xxxxxxxxxxx] On Behalf Of Mickael Istria
Sent: Donnerstag, 5. Februar 2015 16:11
To: Common-build Developers discussion; Tycho developers list
Subject: [tycho-dev] A Mojo to validate version consistency
For JBoss Tools, as we work on different streams, we often forget to update the version on the "master" stream, so that we end up with some latest snapshots whose version is inferior to the one of the latest release (from a maintenance stream). We used to catch
it late in the release process, when there are deadline and it's much more difficult to fix it.
Other projects we contribute to, such as Eclipse Platform (
https://bugs.eclipse.org/bugs/show_bug.cgi?id=443353 ) or WebTools (
https://bugs.eclipse.org/bugs/show_bug.cgi?id=457292 ) also have the same issue from time to time.
We've implemented a Mojo, that hooks on the verify phase of any Maven artifact creating p2 IUs using Tycho (eclipse-plugin, eclipse-feature, eclipse-repository), which takes as input a "baseline" -usually the last released p2 repository- and that compares the
version of artifacts produced by the build with the one in the baseline, and would fail with an explicit message when a version is wrong.
Definition of wrong:
* build version strictly inferior to version found in baseline
* version equals with the one in baseline, but *with different content*. (so reproducible builds as documented in
https://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers would still work)
* same x.y.z but with different qualifier.
With those rules, you immediately notice as a Build Error when an artifact has not been upversioned.
For JBoss Tools, it did catch several errors as soon as we did set up the mojo (
https://github.com/jbosstools/jbosstools-build/commit/492e584c817683ad7121627a3e6af39f2b9d5b3e ) , and we are already very happy with it since errors are fixed with a regular change, instead of having to be fixed later, maybe even requiring us to respin
I believe it provides good value to any project built with Tycho. So we'd like to contribute it upstream. I believe the best location for such mojo would be to have it in tycho-extras (or tycho "regular"). Would such a contribution be welcome there?
The Mojo is here: