我在 build.gradle 中使用以下配置来运行 HP Fortify 扫描:
// Fortify configuration
configurations {
fortify { extendsFrom compile }
}
// pull in the fortify libs for the new configuration
dependencies {
fortify 'com.fortify:sourceanalyzer:3.90'
}
task fortifyReport(dependsOn: compileJava) << {
ant.properties['build.compiler']='com.fortify.dev.ant.SCACompiler'
ant.typedef(name: 'sca', classname: 'com.fortify.dev.ant.SourceanalyzerTask', classpath: configurations.fortify.asPath)
ant.sca(jdk:"1.7",
debug:true ,
verbose:true ,
failonerror:true ,
scan:true ,
logFile:file("$buildDir/reports/fortify/Fortify.log"),
resultsFile:file("$buildDir/reports/fortify/${project.name}.fpr")
){
fileset(dir:'src/main') {
include(name:'**/*.java')
}
}
}
但是在执行时我得到以下信息:
* What went wrong:
Execution failed for task ':fortifyReport'.
> Could not resolve all dependencies for configuration 'detachedConfiguration157'.
> Could not find com.fortify:sourceanalyzer:3.90.
我无法在互联网上找到 sourceanalyzer:3.90 插件。请告知如何解决此问题。