Gradle依赖项排除后,依赖关系仍然在类路径上

时间:2017-10-25 18:24:28

标签: java spring spring-mvc spring-boot gradle

我想删除:

  

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

来自我的classpath。使用依赖关系树,我看到这种依赖关系来自:

  

'org.springframework.boot:弹簧引导配置-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
...

我做错了什么?

1 个答案:

答案 0 :(得分:4)

您可能还需要排除测试依赖性。在脚本中包含以下内容:

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