Hello everybody,
we have a company pom with a maybe unusual versioning schema:
- the development version is always 1-SNAPSHOT
- the release version is always 1.${NEXT_MAJOR}
By means of this "inactive" projects may always stay on
company-pom-1-SNAPSHOT and unusual behaviour is nonetheless provoking
a build error.
Now I want the release procedure for this pom to be:
mvn -B release:prepare release:perform
However I need to determine 1.${NEXT_MAJOR}. I could either ask our
repository manager for the last version CURRENT_MAJOR and just
increase it by one.
Or I could "ask" the SCM (git) for the latest tag, parse this tag and
increase the version accordingly.
I found a page about binding Mojos to custom lifecycles[0] and tried
something like
<plugin>
<artifactId>maven-release-plugin</artifactId>
<extensions>true</extensions>
</plugin>
and tried to bind a mojo to a phase release:check-poms. However this
does not seem to work (tried variations like phase
org.apache.maven.plugins:maven-release-plugin:check-poms as well).
As a last resort, I was thinking about implementing a custom VersionPolicy.
Any other ideas?
Regards Mirko
[0]
http://docs.codehaus.org/display/MAVENUSER/Binding+Mojos+to+custom+LifeCycles+or+inclusion+of+the+Release+Plugin+LifeCycle+into+Maven+Core
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]