Gradle Plugin重复版Artifactory Search

时间:2016-08-22 13:18:14

标签: java plugins gradle artifactory

我正在尝试在项目中应用插件,该项目是公司特定的findbugs插件。在我的父gradle项目中,我有以下内容:

var str = "i:0#.w|xyz\tzzjjaa".replace("i:0#.w|", "");
alert(JSON.stringify(str));

但是,当我构建项目时,构建失败并显示异常报告:

dependencies {  
    findbugs 'com.google.code.findbugs.findbugs:3.0.1'
    findbugs configurations.findbugsPlugins.dependencies
    // Here we specify the findbugsPlugins
    findbugsPlugins 'com.company.common.company-findbugs-plugin:1.01'
}  
task findbugs(type: FindBugs) {
    classes = fileTree(project.rootDir.absolutePath).include("**/*.class");
    source = fileTree(project.rootDir.absolutePath).include("**/*.java");
    classpath = files()
    pluginClasspath = project.configurations.findbugsPlugins
    findbugs {
        toolVersion = "3.0.1"
        sourceSets = [sourceSets.main]
        ignoreFailures = true
        reportsDir = file("$project.buildDir/findbugsReports")
        effort = "max"
        reportLevel = "high"
        includeFilter = file("$rootProject.projectDir/include.xml")
        excludeFilter = file("$rootProject.projectDir/exclude.xml")
    }
tasks.withType(FindBugs) {
    reports {
            xml.enabled = false
            html.enabled = true
    }
  }
}

gradle在路径末尾添加两次版本的原因是什么?

1 个答案:

答案 0 :(得分:0)

您错误地定义了Gradle依赖项,GroupId和ArtifactId之间缺少冒号

'com.google.code.findbugs:findbugs:3.0.1'

同样最有可能适用于

'com.company.common:company-findbugs-plugin:1.01'