We have a multi-module maven project that uses a profile that defines a buildnumber-maven-plugin to increment a build number and then check it into source control.
I
If the plugin is custom one and you have access to plugin MOJO code, you can mark the plugin as aggregator
; if the expected behavior is applicable for all projects where plugin is to be used.
As mentioned in Mojo API Specification ,
Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects listed as modules.
Example,
@Mojo(name = "createHF", inheritByDefault = false, aggregator = true)
public class CreateHFMojo extends AbstractMojo {
..
public void execute() throws MojoExecutionException, MojoFailureException {
....
}
..
}
Detailed example on github.