git-code-format-maven-plugin: Cannot lock .git/index

I’m interesting in trying out this project, but having some trouble getting started.

  • If I have a multi-module project, do I need to install anything in the sub-projects?
  • Do I need to run mvn initialize or is that a stage that happens automatically when I run mvn compile or mvn test?
  • I’m not noticing anything happening. Are there any common errors I might be making?

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 26 (24 by maintainers)

Commits related to this issue

Most upvoted comments

Fixed correctly in https://github.com/Cosium/maven-git-code-format/commit/95941251b71814371f5f9ae72d74fbbab3e6cf38 .

Starting with 1.36, the plugin is now git commit -a compliant 🎉

I was having this issue as well when adding files and commiting in one command:

git commit -a -m "commit message"

It works when I break it into separate commands to add and commit:

git add -A
git commit -m "commit message"