-
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
Fixed to handle git submodules #65
Conversation
…d corrected .git directory searching to work with git submodules.
Neat pull request 👍 I'll look into it ASAP = today, or sunday. Cheers, Konrad |
Testing with "mvn generate-sources", with injectAllReactorProjects set to "true": [INFO] Total time: 1 minute 31 seconds With injectAllReactorProjects set to "false": [INFO] Total time: 19 seconds That's with the verbose set to "false" - It would be slightly longer with verbose true because of the large amount of extra logging output. |
To give you an idea here is a (slightly redacted) list of what it does in my project for each one of the projects in this list it prints this list!: [info] [GitCommitIdMojo] Appending git properties to all reactor projects: |
Finally pushed this ;) Will test a bit more though before releasing a stable version with it. |
This should definitely not be the default (i.e. it should be disabled by default, because that will propagate all(!) properties to all maven modules). See #108. |
there appears to be an edge case bug. i have a project that is originally PHP, and in a sub directory under the root of the original sandbox, we have a new spring-boot conversion, that is pom driven. the original project (being php) has no pom and is not "built" but merely deployed "as is". i found that i had to set injectAllReactorProjects to true, otherwise the properties were not expanded during resource filtering (vars remained ${git.var.name} rather than the expanded value). this seems counter intuitive since the project only has a single pom, even though it is located in a subdirectory below the git repository root. |
Hi,
I have a project which heavily uses git submodules (around 80) and I wanted the branch name from each submodule to use in the name of the package for the submodule. I got this working many months back with an old version of your plugin but the recent changes to git have changed the way .git directories work for git submodules (they are now a file with a path to where the actual directory is), I have been putting off upgrading the version of git my team was using but it has now become an issue so I have updated your plugin to support the new git submodule format.
That was the primary purpose of my commit but I have also done a couple of other things (hope you don't mind!) ...
All of the changes (apart from the log verbosity change) should give the same current behaviour with their default settings. I have tested the plugin with git 1.7 and git 1.9 (between those two the git directory format was changed) and it works fine for me with both. If you accept this plugin I would appreciate if you could get it up into the maven repos (as 2.15?) asap so I can update my projects to use this version!