Question

I want to use a Groovy script (using groovy-maven-plugin) to tune the way the maven-release-plugin is invoked. I need to use a Groovy script since profile activation lacks the necessary expressive power to conditionally activate the configuration the way I want.

However, I do not understand how I can inject the necessary Groovy code to run during release:prepare before the subprocess starts. During normal install or verify goals, I can just bind the script to the validate or initialize phases, but I cannot get this to work with release:prepare.

To clarify, what I am trying to do is to have different preparationGoals, completionGoals etc depending on the results of a deeper inspection of my project.

Was it helpful?

Solution

After finally checking out the source code to maven-release-plugin and going through the code, I conclude that the behavior is hard-coded into the plugin, with no possibility to customize.

Yet another reason not to use this plugin, I guess.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top