gpt4 book ai didi

gradle - 找不到org.slf4j软件包

转载 作者:行者123 更新时间:2023-12-03 06:05:52 25 4
gpt4 key购买 nike

当我尝试将以下内容添加到我的依赖项中时,我收到一条错误消息:“找不到参数[log4j:log等...的方法compile <>”。

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' }
}
}

最佳答案

移动此部分:

apply plugin: net.saliman.gradle.plugin.cobertura.CoberturaPlugin
apply plugin: 'java'
version = 1.0
apply plugin: 'war'

build.gradle的开头。

关于gradle - 找不到org.slf4j软件包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38856603/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com