Closed stefanseifert closed 4 years ago
It is deprecated.
You can also pass additional parameters using argLine
from the command line.
oh, i see, thanks for the pointer (see also [MRELEASE-896|https://issues.apache.org/jira/browse/MRELEASE-896]).
but that does not mean release profiles should not be used, it only means there is no predefined release profile any longer. there should be a easy support in gitflow-maven-plugin to activate one or multiple profile only for the release-relevant goals release, release-finish, hotfix-finish
the maven release plugin has a new (non-deprecated) property releaseProfiles
for this:
https://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#releaseProfiles
maybe such a property should be added
argLine
is an alternative, but it is applied to all goals, not only the release-relevant goals. alternative would be to add something like postReleaseArgLine
.
as a fact it's already possible to (mis?)use the existing parameter postReleaseGoals
for activating a release profile, example:
<gitflow.postReleaseGoals>clean deploy -Prelease-profile</gitflow.postReleaseGoals>
although the parameter is named "goals" it's string is passed without further processing to the command line of the additional maven call working exactly as intended.
I'm in process of migrating from jgitflow-maven-plugin to gitflow-maven-plugin and i'm missing a
useReleaseProfile
parameter, here is the documentation from jgitflow-maven-plugin: https://bitbucket.org/atlassian/jgit-flow/wiki/goals/release-finish#!usereleaseprofilecurrently gitflow-maven-plugin ignores maven profiles, but the
release-profile
profile is used by default by maven-release-plugin and jgitflow-maven-plugin and this should also be done by gitflow-maven-plugin (or at least optionally using a new flag to not break backward compatibility).i figured out the following workaround to achieve this, but the configuration is quite clumsy:
with this it's possible to pass additional parameters when doing the release e.g. for code signing (same as for maven-release-plugin):