由于此错误,我的构建失败:
评估项目“:DBSupport”时出现问题。 > 找不到
参数 [project ':Core:Platform '] 上提供的方法providedCompile()
项目“:DBSupport”。
知道这意味着什么吗?
description = 'DBSupport main component of DBSupportTool'
dependencies {
providedCompile project(':Core:Platform')
providedCompile project(':Core:Verification')
providedCompile project(':DBSupportWeb')
providedCompile project(':DBSupportEJB')
compile(group: 'commons-lang', name: 'commons-lang', version:'1.0.1') {
/* This dependency was originally in the Maven provided scope, but the project was not of type war.
This behavior is not yet supported by Gradle, so this dependency has been converted to a compile dependency.
Please review and delete this closure when resolved. */
}
compile(group: 'commons-logging', name: 'commons-logging', version:'1.0.4') {
/* This dependency was originally in the Maven provided scope, but the project was not of type war.
This behavior is not yet supported by Gradle, so this dependency has been converted to a compile dependency.
Please review and delete this closure when resolved. */
}
compile(group: 'javax', name: 'j2ee', version:'1.0') {
/* This dependency was originally in the Maven provided scope, but the project was not of type war.
This behavior is not yet supported by Gradle, so this dependency has been converted to a compile dependency.
Please review and delete this closure when resolved. */
}
我认为这些模块实际上应该按提供的方式对待(例如不应该是 WAR 存档中的包)。如果不是就改一下编译即可。
providedCompile
Gradle 中不提供开箱即用的配置。如果这是一个 Web 模块,您只需添加/应用一个 war 插件即可:
apply plugin: 'war'
如果没有,您应该能够手动添加此配置:
configurations {
providedCompile
}
dependencies {
providedCompile project(':Core:Platform')
...
}
sourceSets.main.compileClasspath += configurations.providedCompile
sourceSets.test.compileClasspath += configurations.providedCompile
sourceSets.test.runtimeClasspath += configurations.providedCompile
还有一个propdeps 插件 https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin它声称透明地做同样的事情。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)