小编典典

Gradle依赖项排除后仍然对classpath依赖

spring-mvc

我要删除:

“ com.vaadin.external.google:androidjson:0.0.20131108.vaadin1”

从我的课堂路径。通过依赖关系树,我看到了这种依赖关系来自:

‘org.springframework.boot:spring-boot-configuration-rocessor:1.5.8.RELEASE’。

因此,我将其更改为以下内容:

compile ('org.springframework.boot:spring-boot-configuration-processor:1.5.8.RELEASE'){
    exclude group: 'com.vaadin.external.google', module: 'android-json'
}

我的问题是依存关系仍然被取消:

...
+--- org.springframework.boot:spring-boot-configuration-processor:1.5.8.RELEASE
|    \--- com.vaadin.external.google:android-json:0.0.20131108.vaadin1
...

我究竟做错了什么?


阅读 724

收藏
2020-06-01

共1个答案

小编典典

您可能也有测试依赖项,因此需要将其排除在外。在脚本中包括以下内容:

testCompile("org.springframework.boot:spring-boot-starter-te‌​st") { 
    exclude group: 'com.vaadin.external.google', module: 'android-json
'}
2020-06-01