-
Notifications
You must be signed in to change notification settings - Fork 301
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
The plugin fails when it can't find a revision #63
Comments
Hey Alex, 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 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? :) |
Sounds perfect! It's just a use-case for Travis as far as I know. Jenkins doesn't have the problem. Thanks! |
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:
Sent from my mobile |
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. |
I'm on it guys :-) Cheers from a Cafe in Kraków. Just a small paste for future reference:
|
Unfortunately with version 2.1.9 this problem is still open:
my pom looks like:
Can you fix this? PS: you should change LN 319 of GitCommitIdMojo.java to a catch Exception instead of a IOException and it should work again. |
I think you can increase the "clone depth" of travis in the git:
depth: 500 |
The latest version of the plugin has two options to bypass any kind of exception:
failOnUnableToExtractRepoInfo was introduced with this issue Thanks for reporting and the support to track the problem down. |
Thanks @rmetzger - your workaround worked for me. |
The build plugin fails in Travis with the message "Execution default of goal pl.project13.maven:git-commit-id-plugin:2.1.9:revision failed: Unable to calculate distance between [commit abcd] and [commit cdef]: Missing commit ef12". We upgrade the plugin, and use the configuration property `failOnUnableToExtractRepoInfo`. See git-commit-id/git-commit-id-maven-plugin#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.
You can reproduce the problem like this:
git clone --depth=100 --quiet --branch=branchname git://github.com/crawljax/crawljax.git cd crawljax git checkout -qf 8c2e0f52d27c33df5e1c4c2deec472b1e138d67a mvn clean package -DskipTests=true
This results in the error:
Here's an example of a failed build
I don't mind that it doesn't work, but it shouldn't break the build IMHO.
The text was updated successfully, but these errors were encountered: