maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirko Friedenhagen <>
Subject Hooking into maven-release-plugin:prepare
Date Fri, 15 May 2015 20:23:37 GMT
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


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
-- (

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message