-
Notifications
You must be signed in to change notification settings - Fork 301
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
Empty git.properties is generated in submodules when injectAllReactorProjects=true starting from 8.0.0 #754
Comments
the same issue after update from boot 3.2 to 3.3 |
Thanks for the detailed report! Likely related to #700 |
Spring Boot 3.2.x uses version 6.0.0 of this plugin, Spring Boot 3.3.0 switches to 8.0.2 of the plugin - spring-projects/spring-boot@53f8504 |
…ubmodules when injectAllReactorProjects=true
Thanks again for the reproducer and indeed the problem seems to be related to the changes done in ee43e57. The issue seems to boil down to using: properties = new Properties(contextProperties); instead of the previous properties = contextProperties; The With a properties = new Properties(contextProperties); the properties seem essentially empty (contextProperties are still correctly populated):
I must admit that is a bit of a strange behaviour and when reading the javadoc of the properties class I still wouldn't expect such behaviour. Defaults for me sound like they should be there, but secrectly disappear.... My fix from https://github.com/git-commit-id/git-commit-id-maven-plugin/pull/760/files would propose to run: properties = new Properties();
properties.putAll(contextProperties); which IMHO should also do the trick. Thanks again for the report! |
#754: Fix an issue where empty git.properties had been generated in submodules when injectAllReactorProjects=true
Thanks @TheSnoozer, can confirm that fix works:
|
Great, thanks for the feedback! |
Describe the bug (required)
When running
git-commit-id-plugin
on a multi-module maven project with a parent pom andinjectAllReactorProjects
set totrue
, all generatedgit.properties
in submodules will end up with no content.This bug affects versions 8.0.0+ of plugin, version 7.0.0 is the latest not affected one.
Tell us about your plugin configuration (required)
Tell us about the Plugin version used (required)
7.0.0, 8.0.2, 9.0.0
Tell us about the Maven version used (required)
Steps to Reproduce (required)
Clone repository
Run
maven initialize
and check contents of generatedgit.properties
filesmvn clean initialize # non-empty diff as module1's file only contains header comment diff -u target/classes/git.properties module1/target/classes/git.properties
Re-run with version 7.0.0 of plugin
mvn clean initialize -Dgit-commit-id-maven-plugin.version=7.0.0 # no differences between the files diff -u target/classes/git.properties module1/target/classes/git.properties
Are there any stacktraces or any error messages? (required)
WARNING You may NOT want to paste all the output that is produced with
verbose
publicly,since it MAY contain information you deem sensitive.
Review this CAREFULLY before posting your issue!
mvn clean deploy // ????
Is there a (public) project where this issue can be reproduced? (optional)
https://github.com/KTannenberg/git-commit-id-example
Your Environment (optional)
Ubuntu 22.04.4 LTS running inside WSL2 on Windows 11
Running same steps natively on Windows 11 reproduces same bug
Context (optional)
Looking through diff between 7.0.0 and 8.0.0 I think that this commit might be a culprit - ee43e57
The text was updated successfully, but these errors were encountered: