Fixed to handle git submodules#65
Conversation
…d corrected .git directory searching to work with git submodules.
|
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. |

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!