gpt4 book ai didi

gradle - Gradle依赖项解析错误,
转载 作者:行者123 更新时间:2023-12-03 04:05:57 28 4
gpt4 key购买 nike

当使用Gradle 1.10运行Web应用程序项目的“war”任务时,当我包括对cxf-bundle 2.6.13的依赖项时,开始出现以下错误:

Could not resolve all dependencies for configuration ':runtime'.
Could not resolve <exclude org: module="l:ame="*" type="*.
Required by:
:gradle_dep_issue_example:unspecified > org.apache.cxf:cxf-bundle:2.6.13
java.lang.IllegalArgumentException (no error message)

停止和启动gradle守护程序无效,也不会清除.gradle文件夹。但是,运行 war 任务并传递--refresh-dependencies选项可以解决此问题。不幸的是,--refresh-dependencies选项必须每次使用。

这是一个小的build.gradle文件,它将在运行“downloadRuntimeDeps”任务时重现该问题。
apply plugin: 'war'

repositories {
mavenCentral()
}

dependencies {
compile 'org.apache.cxf:cxf-bundle:2.6.13'
}

task downloadRuntimeDeps(type: Copy){
from configurations.runtime
into new File(getBuildDir(), "/runtime-deps/")
}

最佳答案

该问题最终仅影响gradle 1.10版。我使用版本1.8和1.11进行了测试,但都没有出现此问题。

release notes for gradle 1.11中没有包含引用此类问题的错误修复程序,因此我认为此问题已得到解决,同时解决了一个似乎无关的问题。

解决方案是升级我的所有项目以使用gradle 1.11

关于gradle - Gradle依赖项解析错误,<exclude org:module =“l:ame=” *“type=” *,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21978323/

28 4 0

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