Skip to content

[BUG] #189

Open
Open
[BUG]#189
@nvgadev

Description

@nvgadev

I am trying to utilise the new-sonatype-scan-gradle-plugin in our application.
When we try to add this plugin our build is failing.
failure : * Where:
Build file '/home/app/build.gradle' line: 69

  • What went wrong:
    A problem occurred evaluating root project 'app'.

No signature of method: org.eclipse.jgit.internal.storage.file.FileRepository.getRef() is applicable for argument types: (String) values: [HEAD]
Possible solutions: getAt(java.lang.String), getFS(), grep(), exactRef(java.lang.String), findRef(java.lang.String), getAllRefs()
If i was not adding this new-sonatype-scan-gradle-plugin then the build is successful, but in order to run the nexus iq scan with plugin, this dependency need to be added.

'build.gradle' line: 69 : println "${version.toString()}". it is just printing the version of the app.

The version is getting by using the version strategy from the gradle-git-release plugin (classpath 'org.ajoberstar:gradle-git:1.7.2')

While adding the new-sonatype-scan-gradle-plugin, this new-sonatype-scan-gradle-plugin some how is messing with gradle-git-release plugin or new-sonatype-scan-gradle-plugin messed up with the version in git and it is failing.

Here is my build.gradle file
buildscript {
repositories {
mavenLocal()

    maven {
        url nexusUrl
    }

}
dependencies {
    
    
    classpath 'com.github.maiflai:gradle-scalatest:0.32'
    classpath 'org.ajoberstar:gradle-git:1.7.2'

    classpath "gradle.plugin.gradle-plugins:jartest:1.0.1"
    classpath 'gradle.plugin.com.github.bjornvester:xjc-gradle-plugin:1.6.0'
classpath "org.sonatype.gradle.plugins:scan-gradle-plugin:3.0.0"
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions