当我尝试将这些添加到我的依赖项中时,我收到一个错误消息:“无法找到参数的方法compile<>:log4j:log等.
compile 'log4j:log4j:1.2.17'
compile 'org.slf4j:slf4j-api:1.7.5'
compile 'org.slf4j:slf4j-log4j12:1.7.5'脚本
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'net.saliman:gradle-cobertura-plugin:2.3.1'
}
}
repositories {
mavenCentral()
}
configurations {
junitAnt
}
dependencies {
compile 'log4j:log4j:1.2.17'
compile 'org.slf4j:slf4j-api:1.7.5'
compile 'org.slf4j:slf4j-log4j12:1.7.5'
junitAnt 'junit:junit:4.8.2'
junitAnt('org.apache.ant:ant-junit:1.9.2') {
transitive = false
}
junitAnt('org.apache.ant:ant-junit4:1.9.2') {
transitive = false
}
}
apply plugin: net.saliman.gradle.plugin.cobertura.CoberturaPlugin
apply plugin: 'java'
version = 1.0
apply plugin: 'war'
sourceSets {
main {
java { srcDir 'src' }
resources { srcDir 'src' }
resources { srcDir 'WebContent/WEB-INF/lib' }
}
test {
resources { srcDir 'test' }
}
}发布于 2016-08-09 17:22:14
移动本节:
apply plugin: net.saliman.gradle.plugin.cobertura.CoberturaPlugin
apply plugin: 'java'
version = 1.0
apply plugin: 'war'在build.gradle开始的时候。
https://stackoverflow.com/questions/38856603
复制相似问题