Maven cannot find .git (dotGitDirectory) -
i have issue similar has been asked here, there no answer. have following structure in maven project (which standard):
parent-pom - parent others |_reactor - concrete project, parent-pom parent |_module_1 - reactor parent |_module_2 ... |_module_n
git-commit-id-plugin configured in parent-pom , else.
until fine: able build both whole reactor project , modules separately mvn clean install. added new module (let's module_n1), believe build had been going fine until massive merge. got following situation: reactor build successful, each module separately 1 n builds well. module_n1 fails following error:
[error] failed execute goal pl.project13.maven:git-commit-id-plugin:2.1.7:revision (default) on project module_n1: .git directory not found! please specify valid [dotgitdirectory] in pom.xml
there .git folder under reactor module. experiment removed , same error other modules.
what reason why 1 particular module cannot find .git folder during build?
thanks.
i bumped problem today , solution pretty clear looking @ documented maven plugin:
https://github.com/ktoso/maven-git-commit-id-plugin
here have declared plugin in 'module_n1' , there no .git directory in folder. solution configure plugin follow if .git directory in parent directory (eg. reactor):
<plugin> <groupid>pl.project13.maven</groupid> <artifactid>git-commit-id-plugin</artifactid> <version>2.1.15</version> <executions> <execution> <goals> <goal>revision</goal> </goals> </execution> </executions> <configuration> <dotgitdirectory>${project.basedir}/../.git</dotgitdirectory> <!-- more config here see fit --> </configuration> </plugin>
Comments
Post a Comment