4

I'm encountering a weird error, I want to use the nebula.release plugin in Gradle. I'fe had success adding it both of the following ways:

plugins {
    id 'nebula.release' version '6.3.5'
}

and

dependencies {
    classpath 'com.netflix.nebula:nebula-release-plugin:6.3.4'
}
apply plugin: 'nebula.release'

However, no matter what, when I add the following classpath line for spring-cloud-contracts:

classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:2.1.0.RELEASE"

It gives me the following error:

An exception occurred applying plugin request [id: 'nebula.release', version: '6.3.5']
> Failed to apply plugin [id 'nebula.release']
   > 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()

I'm not sure at all why adding this one dependency breaks so many things, any help would be great!

Bill L
  • 2,576
  • 4
  • 28
  • 55

1 Answers1

0

Try to bump your Nebula plugin to later version for example to 15.1.0.

Sample project: https://github.com/athlan/spring-cloud-contract-nebula-example

Detailed description:

Spring Cloud Contract ships newer version of jgit library (in comparison to nebula version you referenced) where above mentioned method has been deprecated and in newer version finally removed.

Athlan
  • 6,389
  • 4
  • 38
  • 56