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
Error when some tag in local repo: "Unable to find commits until some tag: Did not find any commits until some tag" #61
Comments
Hey, please add more details :) |
1st ping, please add more details :) |
No cześć :)
I am on a "develop" branch and the problem occurs only when I fetch remote tags locally. If I remove them from local repo everything works fine. |
Cześć :-) Well' I'm more interested in the tree you're working on. A screenshot from gitk (just the tree) or log --tree would help me out here :) |
That's a good example, thanks a lot :-) Thanks for the graph again! :-) |
I am having the same problem. It is worth noting that when I deleted all tags in the local repository the problem went away. |
Problem is introduced in version 2.1.0. (Version 2.1.3 en 2.1.4 contains also this problem.) It is currently impossible to use this maven plugin in a git repo with tags. |
For anyone else having problems with this: it is caused by not having a tag in your current branch (hence |
Thanks for the description of the case guys! I'm currently fully enganged in organising http://geecon.org so the fix may take a bit time still... but I'll get it out there, promissed :) |
@ktoso Honestly, I don't think this is a problem with your plugin. Rather, it comes from an error reported by git itself, and, in our cases, the lack of additional tags in the current branch. As soon as I added a tag in my current branch (making at least one tag available), everything worked fine. |
The plugin should at least not crash I think - warnings in the logs may be enough here I think :) |
I agree the error reporting could be improved, but I'm not sure if you're going to be able to do much, if the underlying git command itself is reporting an error. My 2 cents - I just wanted to make sure everyone else was aware of the workaround. Have fun at geecon & thanks for your plugin. |
Thank you! This is a workable workaround. |
The error from the git command is:
However, there were unannotated tags: try --tags. So to make the plugin more failsafe, maybe you could add '--tags' to the command?
The question however if this is desired, because you might end up with a very old/unrelated tag. |
I'm encountering this issue as well, is this issue actively being worked on? |
This will work if you don't mind not including the description output:
|
Was this resolved in v2.1.8 via #84 ? |
My CI build uses shallow clones for performance reasons and the describe fails. I believe this is a bug in the plugin and it should be fixed. If Git does not provide any describe information then the plugin should, at most, display a warning. It should not make my build fail. |
My builds initially got this error too. We added a tag as suggested above and the problem went away for a while. But then the issue came back. We too were using shallow clones. Unchecking the shallow clones in the git repository checkout fixed this issue the second time. |
I think the
Results:
versus:
|
Hi, this issue is on the market for quite a long time and I wanted to check if there is any issue unresolved yet ar at least a workaround suggested. Thanks, |
(hit the issue git-commit-id/git-commit-id-maven-plugin#61 using 2.1.5) RB_ID=621096
I have the same problem with version 2.1.9: [ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.5:revision (default) on project xss-taglib: Execution default of goal pl.project13.maven:git-commit-id-plugin:2.1.5:revision failed: Unable to find commits until some tag: Did not find any commits until some tag -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.5:revision (default) on project xss-taglib: Execution default of goal pl.project13.maven:git-commit-id-plugin:2.1.5:revision failed: Unable to find commits until some tag
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal pl.project13.maven:git-commit-id-plugin:2.1.5:revision failed: Unable to find commits until some tag
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: java.lang.RuntimeException: Unable to find commits until some tag
at pl.project13.jgit.DescribeCommand.findCommitsUntilSomeTag(DescribeCommand.java:430)
at pl.project13.jgit.DescribeCommand.call(DescribeCommand.java:328)
at pl.project13.maven.git.GitCommitIdMojo.putGitDescribe(GitCommitIdMojo.java:456)
at pl.project13.maven.git.GitCommitIdMojo.maybePutGitDescribe(GitCommitIdMojo.java:449)
at pl.project13.maven.git.GitCommitIdMojo.loadGitData(GitCommitIdMojo.java:395)
at pl.project13.maven.git.GitCommitIdMojo.execute(GitCommitIdMojo.java:269)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
Caused by: java.lang.RuntimeException: Did not find any commits until some tag
at pl.project13.jgit.DescribeCommand.findCommitsUntilSomeTag(DescribeCommand.java:428) UPD: Strange.. I can't build project in terminal with bash, but it is possible to do it in Intellij IDEA (maybe it's my local problem). |
Hi @vbauer could you post your configuration of the plugin? Thanks, |
Configuration of the plugin: <plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>${git-commit-id-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<prefix>git</prefix>
<verbose>true</verbose>
<dateFormat>yyyy-MM-dd-HH-mm-ss</dateFormat>
</configuration>
</plugin> I haven't tried to use workaround, just wanted to provide some additional information. For now, I can build project in Intellij IDEA (instead of console) and it is fine for me. |
This is not vbauer's email. Sent from my Verizon Wireless 4G LTE smartphone -------- Original message -------- Hi @vbauer could you post your configuration of the plugin? Does the suggested workarounds do not help here? Thanks, — |
I've just tried to use version 2.2.0 and it works fine (sorry, I haven't seen it before). |
Thanks for the feedback :-) @mdern, Everybody will receive an eMail who subscribed to this issue :-) |
I've tried version 2.2.2 and in my in my case JGit is not able to honor I solved the issue by turning on the native git support feature:
|
Please do open a new issue for this and paste in a full config of your plugin. |
git-commit-id-plugin should pass `--always` to git when running describe to avoid git returning an error when describing a shallow clone. See git-commit-id/git-commit-id-maven-plugin#61
git tag -l | xargs git tag -d |
I don't think deleting tags in your repository is the "fix". It's likely either a problem or a problem with what you ask from git, or potentially even still a problem in the plugin. As outlined above -- totential ways of avoiding the issue
<useNativeGit>true</useNativeGit>
<gitDescribe>
<skip>false</skip>
<always>true</always>
</gitDescribe> if that doesn't solve it please open a new ticket ideally with a repository where this issue can be reproduced. |
This fixes an issue with git describe when the repo has no tags. Build could fail with the error "Unable to find commits until some tag". see: git-commit-id/git-commit-id-maven-plugin#61
When we have a tag in local repo the following exception is thrown:
"Unable to find commits until some tag: Did not find any commits until some tag"
The text was updated successfully, but these errors were encountered: