I have an issue similar to what has been asked here, but there is no answer. Have following structure in maven project (which is standard):
parent-pom - which is a parent for all others
|_reactor - which is a concrete project, parent-pom is a parent
|_module_1 - reactor is a parent
|_module_2
...
|_module_n
git-commit-id-plugin is configured in parent-pom and nowhere else.
Until recently everything was fine: I was able to build both the whole reactor project and all modules separately with mvn clean install. Then I added a new module (let's say module_n1), I believe the build had been going fine until massive merge. Now I got following situation: reactor build is successful, each module separately from 1 to n builds successfully as well. But module_n1 fails with following error:
[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.7:revision (default) on project module_n1: .git directory could not be found! Please specify a valid [dotGitDirectory] in your pom.xml
There is a .git folder under reactor module. As an experiment I removed it and get the same error for other modules.
What could be a reason why one particular module cannot find .git folder during the build?
Thanks.
"-Dmaven.gitcommitid.skip=true"
worked for me."<failOnNoGitDirectory>false</failOnNoGitDirectory>"
did not. – Bever