gradle - 如何排除模块 cxf-rt-transports-http
问题描述
我在 build.gradle 中有以下依赖项:
compile ('org.apache.cxf:cxf-bundle:2.4.2') {
exclude module: 'log4j-over-slf4j'
}
由于库之间的冲突(使用 HTTPConduit),我还想排除包含 transports-http 的模块。我试图排除它,但我认为我没有正确的模块名称
解决方案
该dependencies
任务将为您提供依赖关系报告,您可以在其中查看正在提取哪些传递依赖关系。
./gradlew dependencies --configuration compileClasspath
如果您要检查该任务的输出,您会发现它org.apache.cxf:cxf-bundle
似乎没有引入cxf-rt-transports-http
. 因此,您需要检查您的项目以找出重复依赖项的位置。
Gradle 还提供了一种处理版本冲突的方法:https ://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html#sec:resolving-version-conflict
推荐阅读
- sql-server - 如果前一个已完成且没有错误,如何在 SQL Server 中按顺序运行查询?
- python - 如何为随机森林分类器构建可重用的 scikit-learn 管道?
- javascript - JavaScript 单参数或数组
- python - 如何从 QWebEngineView 禁用 contextMenu?
- reactjs - “IntrinsicAttributes”类型上不存在模态属性“show”
- google-cloud-platform - Scope of Service Account in GCP
- json - 我可以使用什么 curl 命令将 JSON 上的值更改为 true
- html - 平滑切换背景图像 - Angular
- ios - 如何在 Swift 中的集合视图上方添加水平按钮堆栈?
- python - 我在代码中犯了什么错误?它正在运行但没有提供它应该为我显示的输入提供的答案