You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The plugin fails when it can't find a revision #63
The plugin fails when it can't find a revision. I think it happend because someone amended a commit. It could also be because travis doesn't fetch all revisions.
Yeap I see why and can imagine other build servers doing flat checkouts too... Though on a private server you could control that... but not so much on travis.
How about we add an option similar to failOnNoGitDirectory, which would be for example... failOnUnableToExtractRepoInfo = false - that'd save the build from failing on travis :)
I'd rather hide it under an option to allow users to decide if this is a very bad situation for them of if they just don't care.
Is there a workaround for this in the meantime? Something that I can do in git to make it work? Just hit this as a blocker from me checking in my POM updates.
My work around was to activate the plugin only with certain profiles.
On Tuesday, February 19, 2013, Brobble wrote:
Is there a workaround for this in the meantime? Something that I can do in
git to make it work? Just hit this as a blocker from me checking in my POM
updates.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/63#issuecomment-13804265.
My problem is that I am using bamboo for CI and I actually want it to produce the git.properties file. I was hoping for a way to "repair" git so that the plugin would still work. Sounds like if there is a flag that just ignore the git.properties not being produced it wouldn't work for me.
Unfortunately with version 2.1.9 this problem is still open:
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to calculate distance between [commit 0bce3c122a48386c2f79d4fe9db2541e484e20d7 1394111047 ----sp] and [commit f1ef9e92d2a55475472bc203b2cc6e03cfb401ca 1393494246 ----sp]
Missing commit 05a4f1269b1b22de00517c1983a2538031dff94d
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.RuntimeException: Unable to calculate distance between [commit 0bce3c122a48386c2f79d4fe9db2541e484e20d7 1394111047 ----sp] and [commit f1ef9e92d2a55475472bc203b2cc6e03cfb401ca 1393494246 ----sp]
at pl.project13.jgit.DescribeCommand.distanceBetween(DescribeCommand.java:488)
at pl.project13.jgit.DescribeCommand.call(DescribeCommand.java:333)
at pl.project13.maven.git.GitCommitIdMojo.putGitDescribe(GitCommitIdMojo.java:509)
at pl.project13.maven.git.GitCommitIdMojo.maybePutGitDescribe(GitCommitIdMojo.java:502)
at pl.project13.maven.git.GitCommitIdMojo.loadGitData(GitCommitIdMojo.java:448)
at pl.project13.maven.git.GitCommitIdMojo.execute(GitCommitIdMojo.java:307)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing commit 05a4f1269b1b22de00517c1983a2538031dff94d
at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:126)
at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:856)
at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:136)
at org.eclipse.jgit.revwalk.RevWalk.parseHeaders(RevWalk.java:965)
at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:814)
at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:725)
at pl.project13.jgit.DescribeCommand.seeAllParents(DescribeCommand.java:505)
at pl.project13.jgit.DescribeCommand.distanceBetween(DescribeCommand.java:466)
... 24 more
Activity
ktoso commentedon Jan 31, 2013
Hey Alex,
thanks for reporting this!
Yeap I see why and can imagine other build servers doing flat checkouts too... Though on a private server you could control that... but not so much on travis.
How about we add an option similar to
failOnNoGitDirectory, which would be for example...failOnUnableToExtractRepoInfo = false- that'd save the build from failing on travis :)I'd rather hide it under an option to allow users to decide if this is a very bad situation for them of if they just don't care.
Sounds good enough? :)
alexnederlof commentedon Feb 1, 2013
Sounds perfect! It's just a use-case for Travis as far as I know. Jenkins doesn't have the problem.
Thanks!
BFinnigan commentedon Feb 19, 2013
Is there a workaround for this in the meantime? Something that I can do in git to make it work? Just hit this as a blocker from me checking in my POM updates.
alexnederlof commentedon Feb 20, 2013
My work around was to activate the plugin only with certain profiles.
On Tuesday, February 19, 2013, Brobble wrote:
Sent from my mobile
BFinnigan commentedon Feb 20, 2013
My problem is that I am using bamboo for CI and I actually want it to produce the git.properties file. I was hoping for a way to "repair" git so that the plugin would still work. Sounds like if there is a flag that just ignore the git.properties not being produced it wouldn't work for me.
ktoso commentedon Mar 25, 2013
I'm on it guys :-) Cheers from a Cafe in Kraków.
Just a small paste for future reference:
#63 allow not dying when a setting is set
TheSnoozer commentedon Mar 6, 2014
Unfortunately with version 2.1.9 this problem is still open:
my pom looks like:
Can you fix this?
Cheers
PS: you should change LN 319 of GitCommitIdMojo.java to a catch Exception instead of a IOException and it should work again.
Merge pull request #100 from TheSnoozer/master
rmetzger commentedon Jul 12, 2014
I think you can increase the "clone depth" of travis in the
.travis.ymlfile with:TheSnoozer commentedon Apr 8, 2015
The latest version of the plugin has two options to bypass any kind of exception:
failOnUnableToExtractRepoInfo was introduced with this issue
failOnNoGitDirectory was introduced with #26
Thanks for reporting and the support to track the problem down.
Work around git-commit-id/git-commit-id-maven-plugin#63
julianhyde commentedon Dec 2, 2015
Thanks @rmetzger - your workaround worked for me.
Work around git-commit-id/git-commit-id-maven-plugin#63
[QUIDEM-25] git-commit-id-plugin fails in Travis