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

grgit.branch.current() fails #229

Closed
WvdWvD opened this issue May 31, 2018 · 7 comments
Closed

grgit.branch.current() fails #229

WvdWvD opened this issue May 31, 2018 · 7 comments
Labels

Comments

@WvdWvD
Copy link

WvdWvD commented May 31, 2018

Since this morning (2018-05-31T06:11:28.179Z) my build fails on "grgit.branch.current()" with the message:

No signature of method: org.eclipse.jgit.internal.storage.file.FileRepository.getRef() is applicable for argument types: (java.lang.String) values: [HEAD]
  Possible solutions: getAt(java.lang.String), getFS(), grep(), exactRef(java.lang.String), findRef(java.lang.String), getAllRefs()

The call to FileRepository.getRef() is on line 44 of org.ajoberstar.grgit.service.BranchService (current master).

Interestingly enough in this particular build 'org.eclipse.jgit' and 'org.eclipse.jgit.ui' have been update to update version '5.0.0.201805151920-m7'.

I have this issue with grgit version 2.1.1 aswell as 2.2.0.

@urisun
Copy link

urisun commented May 31, 2018

Even we are facing the same issue. More details:
Caused by: groovy.lang.MissingMethodException: No signature of method: org.eclipse.jgit.internal.storage.file.FileRepository.getRef() is applicable for argument types: (java.lang.String) values: [HEAD]
Possible solutions: getAt(java.lang.String), getFS(), grep(), exactRef(java.lang.String), findRef(java.lang.String), getAllRefs()
at org.ajoberstar.grgit.service.BranchService.current(BranchService.groovy:44)
at org.ajoberstar.grgit.service.BranchService$current.call(Unknown Source)
at build_3p76j616ztur3ib4y2050x2m$_run_closure8.doCall(/Users/vwwud01/work/GIT/jarvis_apis/build.gradle:75)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
at org.gradle.api.internal.plugins.ExtensionsStorage$ExtensionHolder.configure(ExtensionsStorage.java:145)
at org.gradle.api.internal.plugins.ExtensionsStorage.configureExtension(ExtensionsStorage.java:69)
at org.gradle.api.internal.plugins.DefaultConvention$ExtensionsDynamicObject.invokeMethod(DefaultConvention.java:215)
at org.gradle.internal.metaobject.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:96)
at org.gradle.internal.metaobject.MixInClosurePropertiesAsMethodsDynamicObject.invokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:30)
at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
at build_3p76j616ztur3ib4y2050x2m.run(/Users/vwwud01/work/GIT/jarvis_apis/build.gradle:72)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
... 50 more

@martinmosegaard
Copy link

The method Repository.getRef has been removed in jgit 5.0, in this commit: https://github.com/eclipse/jgit/commit/e1cfe09bfa5b5d9d94189de47301b293ee72b70e#diff-84b209e2927e9436b45eaf8600cbaec1

@ajoberstar
Copy link
Owner

I was under the mistaken assumption that my POMs were being published with static versions, but it seems the com.gradle.plugin-publish plugin doesn't respect the POM modifications to do that.

I'll push out a quick fix to cap the version so it doesn't include v5. But later today I'll figure out how to get static versions published again in the POM.

@ajoberstar ajoberstar added the bug label May 31, 2018
ajoberstar added a commit that referenced this issue May 31, 2018
Unfortunately nebula-maven-resolved-dependencies doesn't seem to put
static versions into the POM of com.gradle-plugin-publish artifacts. It
does affect everything I'm pushing to Bintray though. So we've been
using super permissive dependency ranges out to everyone and now, people
are being bit by a breaking change in JGit 5.

This is a quick fix for #229 to just make the JGit dependency static.
ajoberstar added a commit that referenced this issue May 31, 2018
Unfortunately nebula-maven-resolved-dependencies doesn't seem to put
static versions into the POM of com.gradle-plugin-publish artifacts. It
does affect everything I'm pushing to Bintray though. So we've been
using super permissive dependency ranges out to everyone and now, people
are being bit by a breaking change in JGit 5.

This fixes for #229 to just make the JGit dependency static.
ajoberstar added a commit that referenced this issue May 31, 2018
Unfortunately nebula-maven-resolved-dependencies doesn't seem to put
static versions into the POM of com.gradle-plugin-publish artifacts. It
does affect everything I'm pushing to Bintray though. So we've been
using super permissive dependency ranges out to everyone and now, people
are being bit by a breaking change in JGit 5.

This fixes for #229 to just make the JGit dependency static.
@ajoberstar
Copy link
Owner

I'm gong to have to head off to work, but if this build succeeds there will be a 2.2.1-rc.2 which should statically include JGit 4.11. If that doesn't work or if you need something sooner, you'll need to use the buildscript block to force a specific JGit version to be pulled in.

I still plan to get a final fix out tonight.

@aemyers
Copy link

aemyers commented May 31, 2018

Thank you for the quick fix!

I was building a project last night that suddenly wouldn't build for a release I needed today... I love the simplicity of this plugin. Keep up the great work! :)

@ajoberstar
Copy link
Owner

ajoberstar commented Jun 1, 2018

I'll leave this open until I publish 2.2.1 final (see note in #234 for why that hasn't happened yet). Plan is to wrap this up tonight.

@ajoberstar ajoberstar reopened this Jun 1, 2018
@ajoberstar
Copy link
Owner

2.2.1 is out now

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

No branches or pull requests

5 participants