-
Notifications
You must be signed in to change notification settings - Fork 302
maven.gitcommitid.skip does not override configuration in POM #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We are using plain maven features and not doing any other magic (here is where the parameter comes from: https://github.com/ktoso/maven-git-commit-id-plugin/blob/master/src/main/java/pl/project13/maven/git/GitCommitIdMojo.java#L218) I'll investigate but fear that this is a maven bug. What maven version are you using? |
Congratulation you found what seems to be a Maven-Bug!
Reported here: |
Just saying:
In the end they check all possible ways to skip the plugin: Ugly but would work as a workaround....also from the looks their suggestion of Edit:
Please note that their suggestion More recent documentation here under |
Feedback from the Maven-Issue: <properties>
<maven.buildHelperMojo.skip>true</maven.buildHelperMojo.skip>
</properties> I'll deploy the same workaround used inside the maven-surefire-plugin with two distinct parameters. For the time being please use the workaround suggested. |
Thanks for investigating! The design decision by the Maven Team seems odd to me - but it's nothing we can change. It's sad that now every plugin developer has to implement the workaround to bring back intuitive behaviour. |
@jgerken I would fully agree with your comment. As a plugin developer I also could say use whatever has been suggested by maven which would result that a user would need to define a property inside his own project and provide the value of the property to the configuration of the plugin. However I feel this is ugly and not what I want....forcing me as a plugin dev to define two properties inside the plugin is kinda ugly but thats where I will end up.... Regardless thanks for reporting this - i still consider this as a bug that will get fixed properly! |
…e-plugin to be able to skip via configuration and commandline properly
#315: deploying the workaround used inside maven-surefire-plugin to be able to skip via configuration and commandline properly
Alright....I deployed the changes inside the plugin. Until then please use the suggested workaround with defining a property inside your pom:
|
Executing Maven with the property
-Dmaven.gitcommitid.skip=true
does not skip the plugin execution when the configuration in the POM includes a<skip>false</skip>
. Thus, the command line option does not override the setting in the POM.Usually, all properties set via command line override the settings in the POM (this is even the purpose of the properties), e.g. skipping the tests or skipping linting. In my opinion, the behaviour of the git-commit-plugin should be changed to follow the general Maven approach and let command line property override the setting in the POM.
For now, an easy workaround exists, simply remove
<skip>false</skip>
from the POM.The text was updated successfully, but these errors were encountered: