ktoso/maven-git-commit-id-plugin — Issue #19: .git file refers to .git directory for submodule
Author: hannesd
Created: 2011-12-08 12:34:08+00:00
State: open

I suddenly got the following error message in maven:

[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:1.9:revision (default) on project utils: Could not get HEAD Ref, are you sure you've set the dotGitDirectory property of this plugin to a valid path? -> [Help 1]

I didn't move the .git directory or changed the module's configuration but a look at the .git directory revealed that it now is a file with the following content:

gitdir: /path-to-my-home/repos/myproject/.git/modules/utils

whereas the project I was building is a git submodule located in /path-to-my-home/repos/myproject/utils. The parent project/module is located in /path-to-my-home/repos/myproject.

I'm using version 1.9 of the maven-git-commit-id-plugin, git version 1.7.8 and Apache Maven 3.0.3