Closed 358235737 closed 7 years ago
Does your build actually fail? I believe that the error is benign, but it is indicating that log4j's pom is faulty. There's nothing that the dependency management plugin can do about the problems with log4j's pom.
yes, it's ok ,while i update the log4j's pom to find the junit.jar and the change the scope as runtime,then the error disappeared ,thank you ~~!!!
while i refresh dependencies,always show : Errors occurred while build effective model from D:\Users\DENGXINTAO073.gradle\caches\modules-2\files-2.1\log4j\log4j\1.2.16\88efb1b8d3d993fe339e9e2b201c75eed57d4c65\log4j-1.2.16.pom: 'build.plugins.plugin[io.spring.gradle.dependencymanagement.org.apache.maven.plugins:maven-antrun-plugin].dependencies.dependency.scope' for junit:junit:jar must be one of [compile, runtime, system] but is 'test'. in log4j:log4j:1.2.16
below as my build.gradle
buildscript { ext { springBootVersion = '1.5.3.RELEASE' } repositories { maven { url "http://nexus-stock.paic.com.cn:8080/nexus/content/repositories/public/" } } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } }
allprojects { apply plugin: 'java' //Java插件 apply plugin: 'eclipse-wtp'//eclipse插件 apply plugin: 'idea' apply plugin: 'org.springframework.boot'
}
//所有子项目配置 final def var = subprojects { //skipTest跳过测试 gradle build -Dfile.encoding=UTF-8 -PskipTest=true test.onlyIf { !project.hasProperty('skipTest') } //仓库配置 //参照http://gradle.org/docs/2.2.1/userguide/dependency_management.html#sec:repositories //51.6 Repositories repositories { //mavenLocal() //mavenCentral() maven { url "http://nexus-stock.paic.com.cn:8080/nexus/content/repositories/public/" } } //MANIFEST.MF //jar清单,清单内容中可以按需求配置 jar { manifest { attributes("Implementation-Title": "Gradle", "Implementation-Version": version) } } //依赖管理 //参照http://gradle.org/docs/2.2.1/userguide/dependency_management.html
}