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-finish
goal actually uses a default optionuseReleaseProfile
defining:This option has default value to
true
, hence when executing this goal will by default set theperformRelease
property 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-plugin
via the similaruseReleaseProfile
option.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
-P
option and that it will be automatically activated by the goal as well.