I have a Maven profile documentation that I want to get activated when running mvn jgitflow:release-finish. I know that I can do:
mvn jgitflow:release-finish -Pdocumentation
because the documentation of the plugin states:
automatically copies any profiles (-P) and user-properties (-D) passed on the command line to the forked maven process when building
But that means that you cannot forget to add this profile manually.
Objective: I would like to be able to configure Maven so that this profile becomes active automatically (Or that I somehow can activate my profile when the 'release' profile is active).
The
jgitflow:release-finishgoal actually uses a default optionuseReleaseProfiledefining:This option has default value to
true, hence when executing this goal will by default set theperformReleaseproperty totrue.Note that the release profile mentioned above is defined by the super POM, which is actually used by this plugin but also by the
maven-release-pluginvia the similaruseReleaseProfileoption.You can then activate your profile based on this option as well, as following:
This means that you can still esplicitely activate it via the
-Poption and that it will be automatically activated by the goal as well.