Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-commit-id-plugin plugin causes error when git worktree feature is used. #200

Closed
whitingjr opened this issue Jun 6, 2023 · 2 comments · May be fixed by #201
Closed

git-commit-id-plugin plugin causes error when git worktree feature is used. #200

whitingjr opened this issue Jun 6, 2023 · 2 comments · May be fixed by #201

Comments

@whitingjr
Copy link
Contributor

Using Git Worktree feature is useful to juggle multiple branches and tags.

However the path for all the Git metadata and directories is not always present. When working in a worktree path.
For example a mvn package goal will fail due to the git-commit-id-plugin throwing an error.

[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:3.0.0:revision (get-the-git-infos) on project qDup: Could not complete Mojo execution...: Error: Missing unknown 1fc7ef9fc818e5a6edff7a1b059375ce8a9c3ac7 -> [Help 1]

@willr3
Copy link
Collaborator

willr3 commented Jun 7, 2023

We use this to embed the commit hash in the java code. Is there a different way to capture the git hash?

@whitingjr
Copy link
Contributor Author

by creating the worktree in the folder worktrees allows the worktree branch to work as expected with Git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants