Maven transient dependency (library/jar vaadin json) is not being excluded










1















I have the problem that maven is including 2 versions of the org.json package from two different dependencies.



I have the following:



<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>


But I also have the following outputs ( vaadin is the one I don't want ):



[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test


The dependency tree is showing the following two entries:



[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.3.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | - net.minidev:json-smart:jar:2.3:test
[INFO] | | - net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | - org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime


AND



[INFO] +- org.json:json:jar:20171018:compile


I have tried the following but the annoying vaadin jar is still being included in the project:



<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<dependency>
<groupId>org.mbak.test</groupId>
<artifactId>mb-cloud-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


This is causing a method not found exception.
If we go and delete the JAR from the packaged war manually, everthing is fine!



Update



Below is the full stack trace:



[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli) @ mb-doc-tools ---
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[INFO] org.mbak.menios:mb-doc-tools:war:0.0.1-SNAPSHOT
[INFO] +- org.mbak.mb.meniosapp:mb-cloud-starter:jar:2.0.6.19-SNAPSHOT:compile
[INFO] | +- org.mbak.mb.meniosapp:mb-masc:jar:0.0.0-SNAPSHOT:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | | +- de.escalon.hypermedia:hydra-spring:jar:0.3.1:compile
[INFO] | | | +- de.escalon.hypermedia:hydra-jsonld:jar:0.3.1:compile
[INFO] | | | | - de.escalon.hypermedia:hydra-commons:jar:0.3.1:compile
[INFO] | | | +- de.escalon.hypermedia:spring-hateoas-ext:jar:0.3.1:compile
[INFO] | | | | - com.damnhandy:handy-uri-templates:jar:2.1.4:compile
[INFO] | | | - com.github.jsonld-java:jsonld-java:jar:0.5.1:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient-cache:jar:4.5.6:compile
[INFO] | | | - org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime
[INFO] | | - org.springframework.hateoas:spring-hateoas:jar:0.25.0.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:2.0.8.RELEASE:compile
[INFO] | | - org.springframework:spring-beans:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-properties-migrator:jar:2.0.5.RELEASE:runtime
[INFO] | | - org.springframework.boot:spring-boot-configuration-metadata:jar:2.0.5.RELEASE:runtime
[INFO] | +- org.jolokia:jolokia-core:jar:1.5.0:compile
[INFO] | | - com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-config:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter:jar:2.0.0.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-context:jar:2.0.0.RELEASE:compile
[INFO] | | | - org.springframework.security:spring-security-rsa:jar:1.0.5.RELEASE:compile
[INFO] | | | - org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile
[INFO] | | | - org.bouncycastle:bcprov-jdk15on:jar:1.56:compile
[INFO] | | - org.springframework.cloud:spring-cloud-config-client:jar:2.0.0.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-commons:jar:2.0.0.RELEASE:compile
[INFO] | | - org.springframework.security:spring-security-crypto:jar:5.0.6.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-eureka-client:jar:2.0.0.RELEASE:compile
[INFO] | | +- com.netflix.eureka:eureka-client:jar:1.9.2:compile
[INFO] | | | +- org.codehaus.jettison:jettison:jar:1.3.7:runtime
[INFO] | | | | - stax:stax-api:jar:1.0.1:runtime
[INFO] | | | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0:runtime
[INFO] | | | | +- com.netflix.netflix-commons:netflix-appix:jar:0.3.0:runtime
[INFO] | | | | | +- commons-jxpath:commons-jxpath:jar:1.3:runtime
[INFO] | | | | | - org.antlr:antlr-runtime:jar:3.4:runtime
[INFO] | | | | | +- org.antlr:stringtemplate:jar:3.2.1:runtime
[INFO] | | | | | - antlr:antlr:jar:2.7.7:runtime
[INFO] | | | | - org.apache.commons:commons-math:jar:2.2:runtime
[INFO] | | | +- com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] | | | +- javax.ws.rs:jsr311-api:jar:1.1.1:runtime
[INFO] | | | +- com.netflix.servo:servo-core:jar:0.12.21:runtime
[INFO] | | | +- com.sun.jersey:jersey-core:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey:jersey-client:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:runtime
[INFO] | | | +- com.google.inject:guice:jar:4.1.0:runtime
[INFO] | | | | - aopalliance:aopalliance:jar:1.0:runtime
[INFO] | | | - com.github.vlsi.compactmap:compactmap:jar:1.2.1:runtime
[INFO] | | | - com.github.andrewoma.dexx:dexx-collections:jar:0.2:runtime
[INFO] | | +- com.netflix.eureka:eureka-core:jar:1.9.2:compile
[INFO] | | | - org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:runtime
[INFO] | | | +- javax.xml.stream:stax-api:jar:1.0-2:runtime
[INFO] | | | - org.codehaus.woodstox:stax2-api:jar:3.1.4:runtime
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] | | | - commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | - com.netflix.ribbon:ribbon-eureka:jar:2.2.5:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-zuul:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-zuul:jar:2.0.0.RELEASE:compile
[INFO] | | | - com.netflix.netflix-commons:netflix-commons-util:jar:0.3.0:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.0.0.RELEASE:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-core:jar:1.5.12:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-serialization:jar:1.5.12:compile
[INFO] | | | | - com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.6:runtime
[INFO] | | | +- com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.12:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-javanica:jar:1.5.12:compile
[INFO] | | | | - org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] | | | - io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile
[INFO] | | | - org.reactivestreams:reactive-streams:jar:1.0.2:runtime
[INFO] | | - com.netflix.zuul:zuul-core:jar:1.3.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] | | +- com.netflix.ribbon:ribbon:jar:2.2.5:compile
[INFO] | | | +- com.netflix.ribbon:ribbon-transport:jar:2.2.5:runtime
[INFO] | | | | +- io.reactivex:rxnetty-contexts:jar:0.4.9:runtime
[INFO] | | | | - io.reactivex:rxnetty-servo:jar:0.4.9:runtime
[INFO] | | | +- javax.inject:javax.inject:jar:1:runtime
[INFO] | | | - io.reactivex:rxnetty:jar:0.4.9:runtime
[INFO] | | | +- io.netty:netty-codec-http:jar:4.1.25.Final:runtime
[INFO] | | | | - io.netty:netty-codec:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-transport-native-epoll:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-common:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-transport-native-unix-common:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-transport:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-resolver:jar:4.1.25.Final:runtime
[INFO] | | +- com.netflix.ribbon:ribbon-core:jar:2.2.5:compile
[INFO] | | | - commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- com.netflix.ribbon:ribbon-httpclient:jar:2.2.5:compile
[INFO] | | +- com.netflix.ribbon:ribbon-loadbalancer:jar:2.2.5:compile
[INFO] | | | - com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:runtime
[INFO] | | - io.reactivex:rxjava:jar:1.3.8:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-openfeign:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-openfeign-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- io.github.openfeign:feign-core:jar:9.5.1:compile
[INFO] | | +- io.github.openfeign:feign-slf4j:jar:9.5.1:compile
[INFO] | | +- io.github.openfeign:feign-hystrix:jar:9.5.1:compile
[INFO] | | - io.github.openfeign:feign-java8:jar:9.5.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-ribbon:jar:1.4.5.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-hystrix:jar:1.4.5.RELEASE:compile
[INFO] | +- io.github.openfeign.form:feign-form:jar:3.3.0:compile
[INFO] | | - com.google.code.findbugs:annotations:jar:3.0.1:compile
[INFO] | | - net.jcip:jcip-annotations:jar:1.0:compile
[INFO] | +- io.github.openfeign.form:feign-form-spring:jar:3.3.0:compile
[INFO] | | - commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO] | +- com.keyholesoftware:khs-spring-boot-troublemaker-starter:jar:1.0.0:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | +- net.logstash.logback:logstash-logback-encoder:jar:4.11:compile
[INFO] | +- ch.qos.logback:logback-access:jar:1.2.3:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-sleuth:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.5.RELEASE:compile
[INFO] | | | - org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] | | - org.springframework.cloud:spring-cloud-sleuth-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.aspectj:aspectjrt:jar:1.8.13:compile
[INFO] | | +- io.zipkin.brave:brave:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-context-log4j2:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.1.0:compile
[INFO] | | | - io.zipkin.brave:brave-instrumentation-http:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.1.0:compile
[INFO] | | - io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.1.0:compile
[INFO] | | - io.zipkin.brave:brave-instrumentation-servlet:jar:5.1.0:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-zipkin:jar:2.0.0.RELEASE:compile
[INFO] | | - org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.0.0.RELEASE:compile
[INFO] | | +- io.zipkin.zipkin2:zipkin:jar:2.9.3:compile
[INFO] | | +- io.zipkin.reporter2:zipkin-reporter:jar:2.7.3:compile
[INFO] | | +- io.zipkin.reporter2:zipkin-sender-kafka11:jar:2.7.3:compile
[INFO] | | - io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.7.3:compile
[INFO] | +- io.micrometer:micrometer-core:jar:1.0.6:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.10:compile
[INFO] | | - org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] | +- io.micrometer:micrometer-registry-prometheus:jar:1.0.6:compile
[INFO] | | - io.prometheus:simpleclient_common:jar:0.4.0:compile
[INFO] | | - io.prometheus:simpleclient:jar:0.4.0:compile
[INFO] | +- org.togglz:togglz-spring-boot-starter:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-spring-boot-autoconfigure:jar:2.7.0-SNAPSHOT:compile
[INFO] | | +- org.togglz:togglz-core:jar:2.7.0-SNAPSHOT:compile
[INFO] | | +- org.togglz:togglz-spring-core:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-spring-web:jar:2.7.0-SNAPSHOT:compile
[INFO] | +- org.togglz:togglz-console:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-servlet:jar:2.7.0-SNAPSHOT:compile
[INFO] | - io.github.anand1st:sshd-shell-spring-boot-starter:jar:2.5:compile
[INFO] | +- org.apache.sshd:sshd-core:jar:1.6.0:compile
[INFO] | +- org.jline:jline-reader:jar:3.5.1:compile
[INFO] | | - org.jline:jline-terminal:jar:3.5.1:compile
[INFO] | - org.jline:jline-builtins:jar:3.5.1:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] +- org.mbak.mb.meniosapp:mb-cloud-starter-test:jar:2.0.0-SNAPSHOT:test
[INFO] +- com.aspose:aspose-cells:jar:8.8.2:compile
[INFO] +- com.aspose.pdf:aspose-pdf-jdk16:jar:9.3.1.0:compile
[INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.10:compile
[INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | - xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] +- com.stanfy:gson-xml-java:jar:0.1.7:compile
[INFO] +- org.json:json:jar:20171018:compile
[INFO] +- com.aspose:aspose-words:jar:jdk16:16.8.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | | - org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | | - org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | | - org.yaml:snakeyaml:jar:1.19:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | - com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] | | - org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | - org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.7.RELEASE:compile
[INFO] | - org.springframework:spring-webmvc:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:5.0.7.RELEASE:compile
[INFO] | - org.springframework:spring-expression:jar:5.0.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-actuator:jar:2.0.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.0.5.RELEASE:runtime
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.5.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | - net.minidev:json-smart:jar:2.3:test
[INFO] | | - net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | - org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test


-here



[INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime
[INFO] | +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] | | - org.springframework:spring-jcl:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.0.7.RELEASE:test
[INFO] | - org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.springframework.restdocs:spring-restdocs-mockmvc:jar:2.0.0.RELEASE:test
[INFO] | - javax.servlet:javax.servlet-api:jar:3.1.0:test
[INFO] +- io.rest-assured:rest-assured:jar:3.0.6:test
[INFO] | +- org.codehaus.groovy:groovy:jar:2.4.15:compile
[INFO] | +- org.codehaus.groovy:groovy-xml:jar:2.4.15:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] | | - commons-codec:commons-codec:jar:1.11:compile
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.6:test
[INFO] | - org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:compile
[INFO] +- io.rest-assured:xml-path:jar:3.0.6:compile
[INFO] | +- io.rest-assured:rest-assured-common:jar:3.0.6:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] | - javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO] +- io.rest-assured:json-path:jar:3.0.6:compile
[INFO] | - org.codehaus.groovy:groovy-json:jar:2.4.15:compile
[INFO] +- io.rest-assured:json-schema-validator:jar:3.0.6:test
[INFO] | - com.github.fge:json-schema-validator:jar:2.2.6:test
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO] | +- joda-time:joda-time:jar:2.9.9:compile
[INFO] | +- com.googlecode.libphonenumber:libphonenumber:jar:6.2:test
[INFO] | +- com.github.fge:json-schema-core:jar:1.2.5:test
[INFO] | | +- com.github.fge:uri-template:jar:0.9:test
[INFO] | | | - com.github.fge:mmb-simple:jar:1.1:test
[INFO] | | | - com.github.fge:btf:jar:1.2:test
[INFO] | | +- com.github.fge:jackson-coreutils:jar:1.8:test
[INFO] | | - org.mozilla:rhino:jar:1.7R4:test
[INFO] | +- javax.mail:mailapi:jar:1.4.3:test
[INFO] | | - javax.activation:activation:jar:1.1:test
[INFO] | - net.sf.jopt-simple:jopt-simple:jar:4.6:test
[INFO] +- org.springframework.restdocs:spring-restdocs-core:jar:2.0.0.RELEASE:compile
[INFO] | - com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] +- org.springframework.restdocs:spring-restdocs-restassured:jar:2.0.0.RELEASE:compile
[INFO] +- capital.scalable:spring-auto-restdocs-core:jar:1.0.11:test
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:runtime
[INFO] | - org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.8.0:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.14:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.14:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.8.0:compile
[INFO] | | - io.springfox:springfox-core:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.8.0:compile
[INFO] | | - org.reflections:reflections:jar:0.9.11:compile
[INFO] | | - org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | - org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.8.0:compile
[INFO] - org.projectlombok:lombok:jar:1.16.22:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS


And because of vaadin I was getting:



org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.json.JSONObject.entrySet()Ljava/util/Set;
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1006)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)


Update



I tried the following but it still doesn't fail to exclude vaadin:



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


Additionally, I am noticing the behavior is different when you do mvn spring-boot:run and when you run a packaged war file.



When running the packaged war file we have the error. When we do spring-boot:run we do not.



Weird fix



A colleague of mine fixed this by entering the following exclusion ( but I don't understand why it worked ):



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


Anyone got any ideas?



Similar/same Issue



https://github.com/spring-projects/spring-boot/issues/8706



https://github.com/spring-projects/spring-boot/issues/9248



Dependency still on classpath after Gradle dependency exclusion










share|improve this question
























  • I am a bit confused because "android-json" does not seem to be a dependency of "sg-cloud-starter-test" (following your tree), but you try to exclude it from there. Why?

    – JF Meier
    Nov 12 '18 at 15:27











  • @JF Meier Do you mean spring-boot-starter-test rather than sg-cloud-starter-test? Are you looking at the tree at the top with the skyscanner dep?

    – Ryan Dawson
    Dec 10 '18 at 15:53
















1















I have the problem that maven is including 2 versions of the org.json package from two different dependencies.



I have the following:



<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>


But I also have the following outputs ( vaadin is the one I don't want ):



[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test


The dependency tree is showing the following two entries:



[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.3.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | - net.minidev:json-smart:jar:2.3:test
[INFO] | | - net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | - org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime


AND



[INFO] +- org.json:json:jar:20171018:compile


I have tried the following but the annoying vaadin jar is still being included in the project:



<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<dependency>
<groupId>org.mbak.test</groupId>
<artifactId>mb-cloud-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


This is causing a method not found exception.
If we go and delete the JAR from the packaged war manually, everthing is fine!



Update



Below is the full stack trace:



[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli) @ mb-doc-tools ---
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[INFO] org.mbak.menios:mb-doc-tools:war:0.0.1-SNAPSHOT
[INFO] +- org.mbak.mb.meniosapp:mb-cloud-starter:jar:2.0.6.19-SNAPSHOT:compile
[INFO] | +- org.mbak.mb.meniosapp:mb-masc:jar:0.0.0-SNAPSHOT:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | | +- de.escalon.hypermedia:hydra-spring:jar:0.3.1:compile
[INFO] | | | +- de.escalon.hypermedia:hydra-jsonld:jar:0.3.1:compile
[INFO] | | | | - de.escalon.hypermedia:hydra-commons:jar:0.3.1:compile
[INFO] | | | +- de.escalon.hypermedia:spring-hateoas-ext:jar:0.3.1:compile
[INFO] | | | | - com.damnhandy:handy-uri-templates:jar:2.1.4:compile
[INFO] | | | - com.github.jsonld-java:jsonld-java:jar:0.5.1:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient-cache:jar:4.5.6:compile
[INFO] | | | - org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime
[INFO] | | - org.springframework.hateoas:spring-hateoas:jar:0.25.0.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:2.0.8.RELEASE:compile
[INFO] | | - org.springframework:spring-beans:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-properties-migrator:jar:2.0.5.RELEASE:runtime
[INFO] | | - org.springframework.boot:spring-boot-configuration-metadata:jar:2.0.5.RELEASE:runtime
[INFO] | +- org.jolokia:jolokia-core:jar:1.5.0:compile
[INFO] | | - com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-config:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter:jar:2.0.0.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-context:jar:2.0.0.RELEASE:compile
[INFO] | | | - org.springframework.security:spring-security-rsa:jar:1.0.5.RELEASE:compile
[INFO] | | | - org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile
[INFO] | | | - org.bouncycastle:bcprov-jdk15on:jar:1.56:compile
[INFO] | | - org.springframework.cloud:spring-cloud-config-client:jar:2.0.0.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-commons:jar:2.0.0.RELEASE:compile
[INFO] | | - org.springframework.security:spring-security-crypto:jar:5.0.6.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-eureka-client:jar:2.0.0.RELEASE:compile
[INFO] | | +- com.netflix.eureka:eureka-client:jar:1.9.2:compile
[INFO] | | | +- org.codehaus.jettison:jettison:jar:1.3.7:runtime
[INFO] | | | | - stax:stax-api:jar:1.0.1:runtime
[INFO] | | | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0:runtime
[INFO] | | | | +- com.netflix.netflix-commons:netflix-appix:jar:0.3.0:runtime
[INFO] | | | | | +- commons-jxpath:commons-jxpath:jar:1.3:runtime
[INFO] | | | | | - org.antlr:antlr-runtime:jar:3.4:runtime
[INFO] | | | | | +- org.antlr:stringtemplate:jar:3.2.1:runtime
[INFO] | | | | | - antlr:antlr:jar:2.7.7:runtime
[INFO] | | | | - org.apache.commons:commons-math:jar:2.2:runtime
[INFO] | | | +- com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] | | | +- javax.ws.rs:jsr311-api:jar:1.1.1:runtime
[INFO] | | | +- com.netflix.servo:servo-core:jar:0.12.21:runtime
[INFO] | | | +- com.sun.jersey:jersey-core:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey:jersey-client:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:runtime
[INFO] | | | +- com.google.inject:guice:jar:4.1.0:runtime
[INFO] | | | | - aopalliance:aopalliance:jar:1.0:runtime
[INFO] | | | - com.github.vlsi.compactmap:compactmap:jar:1.2.1:runtime
[INFO] | | | - com.github.andrewoma.dexx:dexx-collections:jar:0.2:runtime
[INFO] | | +- com.netflix.eureka:eureka-core:jar:1.9.2:compile
[INFO] | | | - org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:runtime
[INFO] | | | +- javax.xml.stream:stax-api:jar:1.0-2:runtime
[INFO] | | | - org.codehaus.woodstox:stax2-api:jar:3.1.4:runtime
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] | | | - commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | - com.netflix.ribbon:ribbon-eureka:jar:2.2.5:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-zuul:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-zuul:jar:2.0.0.RELEASE:compile
[INFO] | | | - com.netflix.netflix-commons:netflix-commons-util:jar:0.3.0:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.0.0.RELEASE:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-core:jar:1.5.12:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-serialization:jar:1.5.12:compile
[INFO] | | | | - com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.6:runtime
[INFO] | | | +- com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.12:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-javanica:jar:1.5.12:compile
[INFO] | | | | - org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] | | | - io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile
[INFO] | | | - org.reactivestreams:reactive-streams:jar:1.0.2:runtime
[INFO] | | - com.netflix.zuul:zuul-core:jar:1.3.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] | | +- com.netflix.ribbon:ribbon:jar:2.2.5:compile
[INFO] | | | +- com.netflix.ribbon:ribbon-transport:jar:2.2.5:runtime
[INFO] | | | | +- io.reactivex:rxnetty-contexts:jar:0.4.9:runtime
[INFO] | | | | - io.reactivex:rxnetty-servo:jar:0.4.9:runtime
[INFO] | | | +- javax.inject:javax.inject:jar:1:runtime
[INFO] | | | - io.reactivex:rxnetty:jar:0.4.9:runtime
[INFO] | | | +- io.netty:netty-codec-http:jar:4.1.25.Final:runtime
[INFO] | | | | - io.netty:netty-codec:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-transport-native-epoll:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-common:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-transport-native-unix-common:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-transport:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-resolver:jar:4.1.25.Final:runtime
[INFO] | | +- com.netflix.ribbon:ribbon-core:jar:2.2.5:compile
[INFO] | | | - commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- com.netflix.ribbon:ribbon-httpclient:jar:2.2.5:compile
[INFO] | | +- com.netflix.ribbon:ribbon-loadbalancer:jar:2.2.5:compile
[INFO] | | | - com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:runtime
[INFO] | | - io.reactivex:rxjava:jar:1.3.8:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-openfeign:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-openfeign-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- io.github.openfeign:feign-core:jar:9.5.1:compile
[INFO] | | +- io.github.openfeign:feign-slf4j:jar:9.5.1:compile
[INFO] | | +- io.github.openfeign:feign-hystrix:jar:9.5.1:compile
[INFO] | | - io.github.openfeign:feign-java8:jar:9.5.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-ribbon:jar:1.4.5.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-hystrix:jar:1.4.5.RELEASE:compile
[INFO] | +- io.github.openfeign.form:feign-form:jar:3.3.0:compile
[INFO] | | - com.google.code.findbugs:annotations:jar:3.0.1:compile
[INFO] | | - net.jcip:jcip-annotations:jar:1.0:compile
[INFO] | +- io.github.openfeign.form:feign-form-spring:jar:3.3.0:compile
[INFO] | | - commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO] | +- com.keyholesoftware:khs-spring-boot-troublemaker-starter:jar:1.0.0:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | +- net.logstash.logback:logstash-logback-encoder:jar:4.11:compile
[INFO] | +- ch.qos.logback:logback-access:jar:1.2.3:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-sleuth:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.5.RELEASE:compile
[INFO] | | | - org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] | | - org.springframework.cloud:spring-cloud-sleuth-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.aspectj:aspectjrt:jar:1.8.13:compile
[INFO] | | +- io.zipkin.brave:brave:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-context-log4j2:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.1.0:compile
[INFO] | | | - io.zipkin.brave:brave-instrumentation-http:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.1.0:compile
[INFO] | | - io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.1.0:compile
[INFO] | | - io.zipkin.brave:brave-instrumentation-servlet:jar:5.1.0:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-zipkin:jar:2.0.0.RELEASE:compile
[INFO] | | - org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.0.0.RELEASE:compile
[INFO] | | +- io.zipkin.zipkin2:zipkin:jar:2.9.3:compile
[INFO] | | +- io.zipkin.reporter2:zipkin-reporter:jar:2.7.3:compile
[INFO] | | +- io.zipkin.reporter2:zipkin-sender-kafka11:jar:2.7.3:compile
[INFO] | | - io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.7.3:compile
[INFO] | +- io.micrometer:micrometer-core:jar:1.0.6:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.10:compile
[INFO] | | - org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] | +- io.micrometer:micrometer-registry-prometheus:jar:1.0.6:compile
[INFO] | | - io.prometheus:simpleclient_common:jar:0.4.0:compile
[INFO] | | - io.prometheus:simpleclient:jar:0.4.0:compile
[INFO] | +- org.togglz:togglz-spring-boot-starter:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-spring-boot-autoconfigure:jar:2.7.0-SNAPSHOT:compile
[INFO] | | +- org.togglz:togglz-core:jar:2.7.0-SNAPSHOT:compile
[INFO] | | +- org.togglz:togglz-spring-core:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-spring-web:jar:2.7.0-SNAPSHOT:compile
[INFO] | +- org.togglz:togglz-console:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-servlet:jar:2.7.0-SNAPSHOT:compile
[INFO] | - io.github.anand1st:sshd-shell-spring-boot-starter:jar:2.5:compile
[INFO] | +- org.apache.sshd:sshd-core:jar:1.6.0:compile
[INFO] | +- org.jline:jline-reader:jar:3.5.1:compile
[INFO] | | - org.jline:jline-terminal:jar:3.5.1:compile
[INFO] | - org.jline:jline-builtins:jar:3.5.1:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] +- org.mbak.mb.meniosapp:mb-cloud-starter-test:jar:2.0.0-SNAPSHOT:test
[INFO] +- com.aspose:aspose-cells:jar:8.8.2:compile
[INFO] +- com.aspose.pdf:aspose-pdf-jdk16:jar:9.3.1.0:compile
[INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.10:compile
[INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | - xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] +- com.stanfy:gson-xml-java:jar:0.1.7:compile
[INFO] +- org.json:json:jar:20171018:compile
[INFO] +- com.aspose:aspose-words:jar:jdk16:16.8.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | | - org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | | - org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | | - org.yaml:snakeyaml:jar:1.19:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | - com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] | | - org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | - org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.7.RELEASE:compile
[INFO] | - org.springframework:spring-webmvc:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:5.0.7.RELEASE:compile
[INFO] | - org.springframework:spring-expression:jar:5.0.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-actuator:jar:2.0.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.0.5.RELEASE:runtime
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.5.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | - net.minidev:json-smart:jar:2.3:test
[INFO] | | - net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | - org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test


-here



[INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime
[INFO] | +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] | | - org.springframework:spring-jcl:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.0.7.RELEASE:test
[INFO] | - org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.springframework.restdocs:spring-restdocs-mockmvc:jar:2.0.0.RELEASE:test
[INFO] | - javax.servlet:javax.servlet-api:jar:3.1.0:test
[INFO] +- io.rest-assured:rest-assured:jar:3.0.6:test
[INFO] | +- org.codehaus.groovy:groovy:jar:2.4.15:compile
[INFO] | +- org.codehaus.groovy:groovy-xml:jar:2.4.15:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] | | - commons-codec:commons-codec:jar:1.11:compile
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.6:test
[INFO] | - org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:compile
[INFO] +- io.rest-assured:xml-path:jar:3.0.6:compile
[INFO] | +- io.rest-assured:rest-assured-common:jar:3.0.6:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] | - javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO] +- io.rest-assured:json-path:jar:3.0.6:compile
[INFO] | - org.codehaus.groovy:groovy-json:jar:2.4.15:compile
[INFO] +- io.rest-assured:json-schema-validator:jar:3.0.6:test
[INFO] | - com.github.fge:json-schema-validator:jar:2.2.6:test
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO] | +- joda-time:joda-time:jar:2.9.9:compile
[INFO] | +- com.googlecode.libphonenumber:libphonenumber:jar:6.2:test
[INFO] | +- com.github.fge:json-schema-core:jar:1.2.5:test
[INFO] | | +- com.github.fge:uri-template:jar:0.9:test
[INFO] | | | - com.github.fge:mmb-simple:jar:1.1:test
[INFO] | | | - com.github.fge:btf:jar:1.2:test
[INFO] | | +- com.github.fge:jackson-coreutils:jar:1.8:test
[INFO] | | - org.mozilla:rhino:jar:1.7R4:test
[INFO] | +- javax.mail:mailapi:jar:1.4.3:test
[INFO] | | - javax.activation:activation:jar:1.1:test
[INFO] | - net.sf.jopt-simple:jopt-simple:jar:4.6:test
[INFO] +- org.springframework.restdocs:spring-restdocs-core:jar:2.0.0.RELEASE:compile
[INFO] | - com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] +- org.springframework.restdocs:spring-restdocs-restassured:jar:2.0.0.RELEASE:compile
[INFO] +- capital.scalable:spring-auto-restdocs-core:jar:1.0.11:test
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:runtime
[INFO] | - org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.8.0:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.14:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.14:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.8.0:compile
[INFO] | | - io.springfox:springfox-core:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.8.0:compile
[INFO] | | - org.reflections:reflections:jar:0.9.11:compile
[INFO] | | - org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | - org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.8.0:compile
[INFO] - org.projectlombok:lombok:jar:1.16.22:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS


And because of vaadin I was getting:



org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.json.JSONObject.entrySet()Ljava/util/Set;
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1006)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)


Update



I tried the following but it still doesn't fail to exclude vaadin:



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


Additionally, I am noticing the behavior is different when you do mvn spring-boot:run and when you run a packaged war file.



When running the packaged war file we have the error. When we do spring-boot:run we do not.



Weird fix



A colleague of mine fixed this by entering the following exclusion ( but I don't understand why it worked ):



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


Anyone got any ideas?



Similar/same Issue



https://github.com/spring-projects/spring-boot/issues/8706



https://github.com/spring-projects/spring-boot/issues/9248



Dependency still on classpath after Gradle dependency exclusion










share|improve this question
























  • I am a bit confused because "android-json" does not seem to be a dependency of "sg-cloud-starter-test" (following your tree), but you try to exclude it from there. Why?

    – JF Meier
    Nov 12 '18 at 15:27











  • @JF Meier Do you mean spring-boot-starter-test rather than sg-cloud-starter-test? Are you looking at the tree at the top with the skyscanner dep?

    – Ryan Dawson
    Dec 10 '18 at 15:53














1












1








1








I have the problem that maven is including 2 versions of the org.json package from two different dependencies.



I have the following:



<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>


But I also have the following outputs ( vaadin is the one I don't want ):



[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test


The dependency tree is showing the following two entries:



[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.3.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | - net.minidev:json-smart:jar:2.3:test
[INFO] | | - net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | - org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime


AND



[INFO] +- org.json:json:jar:20171018:compile


I have tried the following but the annoying vaadin jar is still being included in the project:



<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<dependency>
<groupId>org.mbak.test</groupId>
<artifactId>mb-cloud-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


This is causing a method not found exception.
If we go and delete the JAR from the packaged war manually, everthing is fine!



Update



Below is the full stack trace:



[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli) @ mb-doc-tools ---
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[INFO] org.mbak.menios:mb-doc-tools:war:0.0.1-SNAPSHOT
[INFO] +- org.mbak.mb.meniosapp:mb-cloud-starter:jar:2.0.6.19-SNAPSHOT:compile
[INFO] | +- org.mbak.mb.meniosapp:mb-masc:jar:0.0.0-SNAPSHOT:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | | +- de.escalon.hypermedia:hydra-spring:jar:0.3.1:compile
[INFO] | | | +- de.escalon.hypermedia:hydra-jsonld:jar:0.3.1:compile
[INFO] | | | | - de.escalon.hypermedia:hydra-commons:jar:0.3.1:compile
[INFO] | | | +- de.escalon.hypermedia:spring-hateoas-ext:jar:0.3.1:compile
[INFO] | | | | - com.damnhandy:handy-uri-templates:jar:2.1.4:compile
[INFO] | | | - com.github.jsonld-java:jsonld-java:jar:0.5.1:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient-cache:jar:4.5.6:compile
[INFO] | | | - org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime
[INFO] | | - org.springframework.hateoas:spring-hateoas:jar:0.25.0.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:2.0.8.RELEASE:compile
[INFO] | | - org.springframework:spring-beans:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-properties-migrator:jar:2.0.5.RELEASE:runtime
[INFO] | | - org.springframework.boot:spring-boot-configuration-metadata:jar:2.0.5.RELEASE:runtime
[INFO] | +- org.jolokia:jolokia-core:jar:1.5.0:compile
[INFO] | | - com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-config:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter:jar:2.0.0.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-context:jar:2.0.0.RELEASE:compile
[INFO] | | | - org.springframework.security:spring-security-rsa:jar:1.0.5.RELEASE:compile
[INFO] | | | - org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile
[INFO] | | | - org.bouncycastle:bcprov-jdk15on:jar:1.56:compile
[INFO] | | - org.springframework.cloud:spring-cloud-config-client:jar:2.0.0.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-commons:jar:2.0.0.RELEASE:compile
[INFO] | | - org.springframework.security:spring-security-crypto:jar:5.0.6.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-eureka-client:jar:2.0.0.RELEASE:compile
[INFO] | | +- com.netflix.eureka:eureka-client:jar:1.9.2:compile
[INFO] | | | +- org.codehaus.jettison:jettison:jar:1.3.7:runtime
[INFO] | | | | - stax:stax-api:jar:1.0.1:runtime
[INFO] | | | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0:runtime
[INFO] | | | | +- com.netflix.netflix-commons:netflix-appix:jar:0.3.0:runtime
[INFO] | | | | | +- commons-jxpath:commons-jxpath:jar:1.3:runtime
[INFO] | | | | | - org.antlr:antlr-runtime:jar:3.4:runtime
[INFO] | | | | | +- org.antlr:stringtemplate:jar:3.2.1:runtime
[INFO] | | | | | - antlr:antlr:jar:2.7.7:runtime
[INFO] | | | | - org.apache.commons:commons-math:jar:2.2:runtime
[INFO] | | | +- com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] | | | +- javax.ws.rs:jsr311-api:jar:1.1.1:runtime
[INFO] | | | +- com.netflix.servo:servo-core:jar:0.12.21:runtime
[INFO] | | | +- com.sun.jersey:jersey-core:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey:jersey-client:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:runtime
[INFO] | | | +- com.google.inject:guice:jar:4.1.0:runtime
[INFO] | | | | - aopalliance:aopalliance:jar:1.0:runtime
[INFO] | | | - com.github.vlsi.compactmap:compactmap:jar:1.2.1:runtime
[INFO] | | | - com.github.andrewoma.dexx:dexx-collections:jar:0.2:runtime
[INFO] | | +- com.netflix.eureka:eureka-core:jar:1.9.2:compile
[INFO] | | | - org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:runtime
[INFO] | | | +- javax.xml.stream:stax-api:jar:1.0-2:runtime
[INFO] | | | - org.codehaus.woodstox:stax2-api:jar:3.1.4:runtime
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] | | | - commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | - com.netflix.ribbon:ribbon-eureka:jar:2.2.5:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-zuul:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-zuul:jar:2.0.0.RELEASE:compile
[INFO] | | | - com.netflix.netflix-commons:netflix-commons-util:jar:0.3.0:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.0.0.RELEASE:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-core:jar:1.5.12:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-serialization:jar:1.5.12:compile
[INFO] | | | | - com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.6:runtime
[INFO] | | | +- com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.12:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-javanica:jar:1.5.12:compile
[INFO] | | | | - org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] | | | - io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile
[INFO] | | | - org.reactivestreams:reactive-streams:jar:1.0.2:runtime
[INFO] | | - com.netflix.zuul:zuul-core:jar:1.3.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] | | +- com.netflix.ribbon:ribbon:jar:2.2.5:compile
[INFO] | | | +- com.netflix.ribbon:ribbon-transport:jar:2.2.5:runtime
[INFO] | | | | +- io.reactivex:rxnetty-contexts:jar:0.4.9:runtime
[INFO] | | | | - io.reactivex:rxnetty-servo:jar:0.4.9:runtime
[INFO] | | | +- javax.inject:javax.inject:jar:1:runtime
[INFO] | | | - io.reactivex:rxnetty:jar:0.4.9:runtime
[INFO] | | | +- io.netty:netty-codec-http:jar:4.1.25.Final:runtime
[INFO] | | | | - io.netty:netty-codec:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-transport-native-epoll:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-common:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-transport-native-unix-common:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-transport:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-resolver:jar:4.1.25.Final:runtime
[INFO] | | +- com.netflix.ribbon:ribbon-core:jar:2.2.5:compile
[INFO] | | | - commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- com.netflix.ribbon:ribbon-httpclient:jar:2.2.5:compile
[INFO] | | +- com.netflix.ribbon:ribbon-loadbalancer:jar:2.2.5:compile
[INFO] | | | - com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:runtime
[INFO] | | - io.reactivex:rxjava:jar:1.3.8:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-openfeign:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-openfeign-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- io.github.openfeign:feign-core:jar:9.5.1:compile
[INFO] | | +- io.github.openfeign:feign-slf4j:jar:9.5.1:compile
[INFO] | | +- io.github.openfeign:feign-hystrix:jar:9.5.1:compile
[INFO] | | - io.github.openfeign:feign-java8:jar:9.5.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-ribbon:jar:1.4.5.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-hystrix:jar:1.4.5.RELEASE:compile
[INFO] | +- io.github.openfeign.form:feign-form:jar:3.3.0:compile
[INFO] | | - com.google.code.findbugs:annotations:jar:3.0.1:compile
[INFO] | | - net.jcip:jcip-annotations:jar:1.0:compile
[INFO] | +- io.github.openfeign.form:feign-form-spring:jar:3.3.0:compile
[INFO] | | - commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO] | +- com.keyholesoftware:khs-spring-boot-troublemaker-starter:jar:1.0.0:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | +- net.logstash.logback:logstash-logback-encoder:jar:4.11:compile
[INFO] | +- ch.qos.logback:logback-access:jar:1.2.3:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-sleuth:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.5.RELEASE:compile
[INFO] | | | - org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] | | - org.springframework.cloud:spring-cloud-sleuth-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.aspectj:aspectjrt:jar:1.8.13:compile
[INFO] | | +- io.zipkin.brave:brave:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-context-log4j2:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.1.0:compile
[INFO] | | | - io.zipkin.brave:brave-instrumentation-http:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.1.0:compile
[INFO] | | - io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.1.0:compile
[INFO] | | - io.zipkin.brave:brave-instrumentation-servlet:jar:5.1.0:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-zipkin:jar:2.0.0.RELEASE:compile
[INFO] | | - org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.0.0.RELEASE:compile
[INFO] | | +- io.zipkin.zipkin2:zipkin:jar:2.9.3:compile
[INFO] | | +- io.zipkin.reporter2:zipkin-reporter:jar:2.7.3:compile
[INFO] | | +- io.zipkin.reporter2:zipkin-sender-kafka11:jar:2.7.3:compile
[INFO] | | - io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.7.3:compile
[INFO] | +- io.micrometer:micrometer-core:jar:1.0.6:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.10:compile
[INFO] | | - org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] | +- io.micrometer:micrometer-registry-prometheus:jar:1.0.6:compile
[INFO] | | - io.prometheus:simpleclient_common:jar:0.4.0:compile
[INFO] | | - io.prometheus:simpleclient:jar:0.4.0:compile
[INFO] | +- org.togglz:togglz-spring-boot-starter:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-spring-boot-autoconfigure:jar:2.7.0-SNAPSHOT:compile
[INFO] | | +- org.togglz:togglz-core:jar:2.7.0-SNAPSHOT:compile
[INFO] | | +- org.togglz:togglz-spring-core:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-spring-web:jar:2.7.0-SNAPSHOT:compile
[INFO] | +- org.togglz:togglz-console:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-servlet:jar:2.7.0-SNAPSHOT:compile
[INFO] | - io.github.anand1st:sshd-shell-spring-boot-starter:jar:2.5:compile
[INFO] | +- org.apache.sshd:sshd-core:jar:1.6.0:compile
[INFO] | +- org.jline:jline-reader:jar:3.5.1:compile
[INFO] | | - org.jline:jline-terminal:jar:3.5.1:compile
[INFO] | - org.jline:jline-builtins:jar:3.5.1:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] +- org.mbak.mb.meniosapp:mb-cloud-starter-test:jar:2.0.0-SNAPSHOT:test
[INFO] +- com.aspose:aspose-cells:jar:8.8.2:compile
[INFO] +- com.aspose.pdf:aspose-pdf-jdk16:jar:9.3.1.0:compile
[INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.10:compile
[INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | - xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] +- com.stanfy:gson-xml-java:jar:0.1.7:compile
[INFO] +- org.json:json:jar:20171018:compile
[INFO] +- com.aspose:aspose-words:jar:jdk16:16.8.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | | - org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | | - org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | | - org.yaml:snakeyaml:jar:1.19:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | - com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] | | - org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | - org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.7.RELEASE:compile
[INFO] | - org.springframework:spring-webmvc:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:5.0.7.RELEASE:compile
[INFO] | - org.springframework:spring-expression:jar:5.0.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-actuator:jar:2.0.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.0.5.RELEASE:runtime
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.5.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | - net.minidev:json-smart:jar:2.3:test
[INFO] | | - net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | - org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test


-here



[INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime
[INFO] | +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] | | - org.springframework:spring-jcl:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.0.7.RELEASE:test
[INFO] | - org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.springframework.restdocs:spring-restdocs-mockmvc:jar:2.0.0.RELEASE:test
[INFO] | - javax.servlet:javax.servlet-api:jar:3.1.0:test
[INFO] +- io.rest-assured:rest-assured:jar:3.0.6:test
[INFO] | +- org.codehaus.groovy:groovy:jar:2.4.15:compile
[INFO] | +- org.codehaus.groovy:groovy-xml:jar:2.4.15:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] | | - commons-codec:commons-codec:jar:1.11:compile
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.6:test
[INFO] | - org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:compile
[INFO] +- io.rest-assured:xml-path:jar:3.0.6:compile
[INFO] | +- io.rest-assured:rest-assured-common:jar:3.0.6:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] | - javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO] +- io.rest-assured:json-path:jar:3.0.6:compile
[INFO] | - org.codehaus.groovy:groovy-json:jar:2.4.15:compile
[INFO] +- io.rest-assured:json-schema-validator:jar:3.0.6:test
[INFO] | - com.github.fge:json-schema-validator:jar:2.2.6:test
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO] | +- joda-time:joda-time:jar:2.9.9:compile
[INFO] | +- com.googlecode.libphonenumber:libphonenumber:jar:6.2:test
[INFO] | +- com.github.fge:json-schema-core:jar:1.2.5:test
[INFO] | | +- com.github.fge:uri-template:jar:0.9:test
[INFO] | | | - com.github.fge:mmb-simple:jar:1.1:test
[INFO] | | | - com.github.fge:btf:jar:1.2:test
[INFO] | | +- com.github.fge:jackson-coreutils:jar:1.8:test
[INFO] | | - org.mozilla:rhino:jar:1.7R4:test
[INFO] | +- javax.mail:mailapi:jar:1.4.3:test
[INFO] | | - javax.activation:activation:jar:1.1:test
[INFO] | - net.sf.jopt-simple:jopt-simple:jar:4.6:test
[INFO] +- org.springframework.restdocs:spring-restdocs-core:jar:2.0.0.RELEASE:compile
[INFO] | - com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] +- org.springframework.restdocs:spring-restdocs-restassured:jar:2.0.0.RELEASE:compile
[INFO] +- capital.scalable:spring-auto-restdocs-core:jar:1.0.11:test
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:runtime
[INFO] | - org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.8.0:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.14:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.14:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.8.0:compile
[INFO] | | - io.springfox:springfox-core:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.8.0:compile
[INFO] | | - org.reflections:reflections:jar:0.9.11:compile
[INFO] | | - org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | - org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.8.0:compile
[INFO] - org.projectlombok:lombok:jar:1.16.22:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS


And because of vaadin I was getting:



org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.json.JSONObject.entrySet()Ljava/util/Set;
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1006)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)


Update



I tried the following but it still doesn't fail to exclude vaadin:



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


Additionally, I am noticing the behavior is different when you do mvn spring-boot:run and when you run a packaged war file.



When running the packaged war file we have the error. When we do spring-boot:run we do not.



Weird fix



A colleague of mine fixed this by entering the following exclusion ( but I don't understand why it worked ):



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


Anyone got any ideas?



Similar/same Issue



https://github.com/spring-projects/spring-boot/issues/8706



https://github.com/spring-projects/spring-boot/issues/9248



Dependency still on classpath after Gradle dependency exclusion










share|improve this question
















I have the problem that maven is including 2 versions of the org.json package from two different dependencies.



I have the following:



<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>


But I also have the following outputs ( vaadin is the one I don't want ):



[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test


The dependency tree is showing the following two entries:



[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.3.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | - net.minidev:json-smart:jar:2.3:test
[INFO] | | - net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | - org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime


AND



[INFO] +- org.json:json:jar:20171018:compile


I have tried the following but the annoying vaadin jar is still being included in the project:



<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<dependency>
<groupId>org.mbak.test</groupId>
<artifactId>mb-cloud-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


This is causing a method not found exception.
If we go and delete the JAR from the packaged war manually, everthing is fine!



Update



Below is the full stack trace:



[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli) @ mb-doc-tools ---
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[INFO] org.mbak.menios:mb-doc-tools:war:0.0.1-SNAPSHOT
[INFO] +- org.mbak.mb.meniosapp:mb-cloud-starter:jar:2.0.6.19-SNAPSHOT:compile
[INFO] | +- org.mbak.mb.meniosapp:mb-masc:jar:0.0.0-SNAPSHOT:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | | +- de.escalon.hypermedia:hydra-spring:jar:0.3.1:compile
[INFO] | | | +- de.escalon.hypermedia:hydra-jsonld:jar:0.3.1:compile
[INFO] | | | | - de.escalon.hypermedia:hydra-commons:jar:0.3.1:compile
[INFO] | | | +- de.escalon.hypermedia:spring-hateoas-ext:jar:0.3.1:compile
[INFO] | | | | - com.damnhandy:handy-uri-templates:jar:2.1.4:compile
[INFO] | | | - com.github.jsonld-java:jsonld-java:jar:0.5.1:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient-cache:jar:4.5.6:compile
[INFO] | | | - org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime
[INFO] | | - org.springframework.hateoas:spring-hateoas:jar:0.25.0.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:2.0.8.RELEASE:compile
[INFO] | | - org.springframework:spring-beans:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-properties-migrator:jar:2.0.5.RELEASE:runtime
[INFO] | | - org.springframework.boot:spring-boot-configuration-metadata:jar:2.0.5.RELEASE:runtime
[INFO] | +- org.jolokia:jolokia-core:jar:1.5.0:compile
[INFO] | | - com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-config:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter:jar:2.0.0.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-context:jar:2.0.0.RELEASE:compile
[INFO] | | | - org.springframework.security:spring-security-rsa:jar:1.0.5.RELEASE:compile
[INFO] | | | - org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile
[INFO] | | | - org.bouncycastle:bcprov-jdk15on:jar:1.56:compile
[INFO] | | - org.springframework.cloud:spring-cloud-config-client:jar:2.0.0.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-commons:jar:2.0.0.RELEASE:compile
[INFO] | | - org.springframework.security:spring-security-crypto:jar:5.0.6.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-eureka-client:jar:2.0.0.RELEASE:compile
[INFO] | | +- com.netflix.eureka:eureka-client:jar:1.9.2:compile
[INFO] | | | +- org.codehaus.jettison:jettison:jar:1.3.7:runtime
[INFO] | | | | - stax:stax-api:jar:1.0.1:runtime
[INFO] | | | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0:runtime
[INFO] | | | | +- com.netflix.netflix-commons:netflix-appix:jar:0.3.0:runtime
[INFO] | | | | | +- commons-jxpath:commons-jxpath:jar:1.3:runtime
[INFO] | | | | | - org.antlr:antlr-runtime:jar:3.4:runtime
[INFO] | | | | | +- org.antlr:stringtemplate:jar:3.2.1:runtime
[INFO] | | | | | - antlr:antlr:jar:2.7.7:runtime
[INFO] | | | | - org.apache.commons:commons-math:jar:2.2:runtime
[INFO] | | | +- com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] | | | +- javax.ws.rs:jsr311-api:jar:1.1.1:runtime
[INFO] | | | +- com.netflix.servo:servo-core:jar:0.12.21:runtime
[INFO] | | | +- com.sun.jersey:jersey-core:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey:jersey-client:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:runtime
[INFO] | | | +- com.google.inject:guice:jar:4.1.0:runtime
[INFO] | | | | - aopalliance:aopalliance:jar:1.0:runtime
[INFO] | | | - com.github.vlsi.compactmap:compactmap:jar:1.2.1:runtime
[INFO] | | | - com.github.andrewoma.dexx:dexx-collections:jar:0.2:runtime
[INFO] | | +- com.netflix.eureka:eureka-core:jar:1.9.2:compile
[INFO] | | | - org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:runtime
[INFO] | | | +- javax.xml.stream:stax-api:jar:1.0-2:runtime
[INFO] | | | - org.codehaus.woodstox:stax2-api:jar:3.1.4:runtime
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.0.0.RELEASE:compile
[INFO] | | | - commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | - com.netflix.ribbon:ribbon-eureka:jar:2.2.5:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-zuul:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-zuul:jar:2.0.0.RELEASE:compile
[INFO] | | | - com.netflix.netflix-commons:netflix-commons-util:jar:0.3.0:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.0.0.RELEASE:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-core:jar:1.5.12:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-serialization:jar:1.5.12:compile
[INFO] | | | | - com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.6:runtime
[INFO] | | | +- com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.12:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-javanica:jar:1.5.12:compile
[INFO] | | | | - org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] | | | - io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile
[INFO] | | | - org.reactivestreams:reactive-streams:jar:1.0.2:runtime
[INFO] | | - com.netflix.zuul:zuul-core:jar:1.3.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.0.0.RELEASE:compile
[INFO] | | +- com.netflix.ribbon:ribbon:jar:2.2.5:compile
[INFO] | | | +- com.netflix.ribbon:ribbon-transport:jar:2.2.5:runtime
[INFO] | | | | +- io.reactivex:rxnetty-contexts:jar:0.4.9:runtime
[INFO] | | | | - io.reactivex:rxnetty-servo:jar:0.4.9:runtime
[INFO] | | | +- javax.inject:javax.inject:jar:1:runtime
[INFO] | | | - io.reactivex:rxnetty:jar:0.4.9:runtime
[INFO] | | | +- io.netty:netty-codec-http:jar:4.1.25.Final:runtime
[INFO] | | | | - io.netty:netty-codec:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-transport-native-epoll:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-common:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.25.Final:runtime
[INFO] | | | +- io.netty:netty-transport-native-unix-common:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-transport:jar:4.1.25.Final:runtime
[INFO] | | | - io.netty:netty-resolver:jar:4.1.25.Final:runtime
[INFO] | | +- com.netflix.ribbon:ribbon-core:jar:2.2.5:compile
[INFO] | | | - commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- com.netflix.ribbon:ribbon-httpclient:jar:2.2.5:compile
[INFO] | | +- com.netflix.ribbon:ribbon-loadbalancer:jar:2.2.5:compile
[INFO] | | | - com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:runtime
[INFO] | | - io.reactivex:rxjava:jar:1.3.8:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-openfeign:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-openfeign-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- io.github.openfeign:feign-core:jar:9.5.1:compile
[INFO] | | +- io.github.openfeign:feign-slf4j:jar:9.5.1:compile
[INFO] | | +- io.github.openfeign:feign-hystrix:jar:9.5.1:compile
[INFO] | | - io.github.openfeign:feign-java8:jar:9.5.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-ribbon:jar:1.4.5.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-hystrix:jar:1.4.5.RELEASE:compile
[INFO] | +- io.github.openfeign.form:feign-form:jar:3.3.0:compile
[INFO] | | - com.google.code.findbugs:annotations:jar:3.0.1:compile
[INFO] | | - net.jcip:jcip-annotations:jar:1.0:compile
[INFO] | +- io.github.openfeign.form:feign-form-spring:jar:3.3.0:compile
[INFO] | | - commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO] | +- com.keyholesoftware:khs-spring-boot-troublemaker-starter:jar:1.0.0:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | +- net.logstash.logback:logstash-logback-encoder:jar:4.11:compile
[INFO] | +- ch.qos.logback:logback-access:jar:1.2.3:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-sleuth:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.5.RELEASE:compile
[INFO] | | | - org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] | | - org.springframework.cloud:spring-cloud-sleuth-core:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.aspectj:aspectjrt:jar:1.8.13:compile
[INFO] | | +- io.zipkin.brave:brave:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-context-log4j2:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.1.0:compile
[INFO] | | | - io.zipkin.brave:brave-instrumentation-http:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.1.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.1.0:compile
[INFO] | | - io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.1.0:compile
[INFO] | | - io.zipkin.brave:brave-instrumentation-servlet:jar:5.1.0:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-zipkin:jar:2.0.0.RELEASE:compile
[INFO] | | - org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.0.0.RELEASE:compile
[INFO] | | +- io.zipkin.zipkin2:zipkin:jar:2.9.3:compile
[INFO] | | +- io.zipkin.reporter2:zipkin-reporter:jar:2.7.3:compile
[INFO] | | +- io.zipkin.reporter2:zipkin-sender-kafka11:jar:2.7.3:compile
[INFO] | | - io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.7.3:compile
[INFO] | +- io.micrometer:micrometer-core:jar:1.0.6:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.10:compile
[INFO] | | - org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] | +- io.micrometer:micrometer-registry-prometheus:jar:1.0.6:compile
[INFO] | | - io.prometheus:simpleclient_common:jar:0.4.0:compile
[INFO] | | - io.prometheus:simpleclient:jar:0.4.0:compile
[INFO] | +- org.togglz:togglz-spring-boot-starter:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-spring-boot-autoconfigure:jar:2.7.0-SNAPSHOT:compile
[INFO] | | +- org.togglz:togglz-core:jar:2.7.0-SNAPSHOT:compile
[INFO] | | +- org.togglz:togglz-spring-core:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-spring-web:jar:2.7.0-SNAPSHOT:compile
[INFO] | +- org.togglz:togglz-console:jar:2.7.0-SNAPSHOT:compile
[INFO] | | - org.togglz:togglz-servlet:jar:2.7.0-SNAPSHOT:compile
[INFO] | - io.github.anand1st:sshd-shell-spring-boot-starter:jar:2.5:compile
[INFO] | +- org.apache.sshd:sshd-core:jar:1.6.0:compile
[INFO] | +- org.jline:jline-reader:jar:3.5.1:compile
[INFO] | | - org.jline:jline-terminal:jar:3.5.1:compile
[INFO] | - org.jline:jline-builtins:jar:3.5.1:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] +- org.mbak.mb.meniosapp:mb-cloud-starter-test:jar:2.0.0-SNAPSHOT:test
[INFO] +- com.aspose:aspose-cells:jar:8.8.2:compile
[INFO] +- com.aspose.pdf:aspose-pdf-jdk16:jar:9.3.1.0:compile
[INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.10:compile
[INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | - xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] +- com.stanfy:gson-xml-java:jar:0.1.7:compile
[INFO] +- org.json:json:jar:20171018:compile
[INFO] +- com.aspose:aspose-words:jar:jdk16:16.8.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | | - org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | | - org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | | - org.yaml:snakeyaml:jar:1.19:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | - com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] | | - org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | - org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.7.RELEASE:compile
[INFO] | - org.springframework:spring-webmvc:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:5.0.7.RELEASE:compile
[INFO] | - org.springframework:spring-expression:jar:5.0.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-actuator:jar:2.0.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.0.5.RELEASE:runtime
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] | - org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.5.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | - net.minidev:json-smart:jar:2.3:test
[INFO] | | - net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | - org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test


-here



[INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime
[INFO] | +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] | | - org.springframework:spring-jcl:jar:5.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.0.7.RELEASE:test
[INFO] | - org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.springframework.restdocs:spring-restdocs-mockmvc:jar:2.0.0.RELEASE:test
[INFO] | - javax.servlet:javax.servlet-api:jar:3.1.0:test
[INFO] +- io.rest-assured:rest-assured:jar:3.0.6:test
[INFO] | +- org.codehaus.groovy:groovy:jar:2.4.15:compile
[INFO] | +- org.codehaus.groovy:groovy-xml:jar:2.4.15:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] | | - commons-codec:commons-codec:jar:1.11:compile
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.6:test
[INFO] | - org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:compile
[INFO] +- io.rest-assured:xml-path:jar:3.0.6:compile
[INFO] | +- io.rest-assured:rest-assured-common:jar:3.0.6:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] | - javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO] +- io.rest-assured:json-path:jar:3.0.6:compile
[INFO] | - org.codehaus.groovy:groovy-json:jar:2.4.15:compile
[INFO] +- io.rest-assured:json-schema-validator:jar:3.0.6:test
[INFO] | - com.github.fge:json-schema-validator:jar:2.2.6:test
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO] | +- joda-time:joda-time:jar:2.9.9:compile
[INFO] | +- com.googlecode.libphonenumber:libphonenumber:jar:6.2:test
[INFO] | +- com.github.fge:json-schema-core:jar:1.2.5:test
[INFO] | | +- com.github.fge:uri-template:jar:0.9:test
[INFO] | | | - com.github.fge:mmb-simple:jar:1.1:test
[INFO] | | | - com.github.fge:btf:jar:1.2:test
[INFO] | | +- com.github.fge:jackson-coreutils:jar:1.8:test
[INFO] | | - org.mozilla:rhino:jar:1.7R4:test
[INFO] | +- javax.mail:mailapi:jar:1.4.3:test
[INFO] | | - javax.activation:activation:jar:1.1:test
[INFO] | - net.sf.jopt-simple:jopt-simple:jar:4.6:test
[INFO] +- org.springframework.restdocs:spring-restdocs-core:jar:2.0.0.RELEASE:compile
[INFO] | - com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] +- org.springframework.restdocs:spring-restdocs-restassured:jar:2.0.0.RELEASE:compile
[INFO] +- capital.scalable:spring-auto-restdocs-core:jar:1.0.11:test
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:runtime
[INFO] | - org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.8.0:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.14:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.14:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.8.0:compile
[INFO] | | - io.springfox:springfox-core:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.8.0:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.8.0:compile
[INFO] | | - org.reflections:reflections:jar:0.9.11:compile
[INFO] | | - org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | - org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.8.0:compile
[INFO] - org.projectlombok:lombok:jar:1.16.22:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS


And because of vaadin I was getting:



org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.json.JSONObject.entrySet()Ljava/util/Set;
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1006)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)


Update



I tried the following but it still doesn't fail to exclude vaadin:



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


Additionally, I am noticing the behavior is different when you do mvn spring-boot:run and when you run a packaged war file.



When running the packaged war file we have the error. When we do spring-boot:run we do not.



Weird fix



A colleague of mine fixed this by entering the following exclusion ( but I don't understand why it worked ):



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>


Anyone got any ideas?



Similar/same Issue



https://github.com/spring-projects/spring-boot/issues/8706



https://github.com/spring-projects/spring-boot/issues/9248



Dependency still on classpath after Gradle dependency exclusion







java maven






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 10 '18 at 13:50







Menelaos Bakopoulos

















asked Nov 12 '18 at 10:38









Menelaos BakopoulosMenelaos Bakopoulos

12.1k84299




12.1k84299












  • I am a bit confused because "android-json" does not seem to be a dependency of "sg-cloud-starter-test" (following your tree), but you try to exclude it from there. Why?

    – JF Meier
    Nov 12 '18 at 15:27











  • @JF Meier Do you mean spring-boot-starter-test rather than sg-cloud-starter-test? Are you looking at the tree at the top with the skyscanner dep?

    – Ryan Dawson
    Dec 10 '18 at 15:53


















  • I am a bit confused because "android-json" does not seem to be a dependency of "sg-cloud-starter-test" (following your tree), but you try to exclude it from there. Why?

    – JF Meier
    Nov 12 '18 at 15:27











  • @JF Meier Do you mean spring-boot-starter-test rather than sg-cloud-starter-test? Are you looking at the tree at the top with the skyscanner dep?

    – Ryan Dawson
    Dec 10 '18 at 15:53

















I am a bit confused because "android-json" does not seem to be a dependency of "sg-cloud-starter-test" (following your tree), but you try to exclude it from there. Why?

– JF Meier
Nov 12 '18 at 15:27





I am a bit confused because "android-json" does not seem to be a dependency of "sg-cloud-starter-test" (following your tree), but you try to exclude it from there. Why?

– JF Meier
Nov 12 '18 at 15:27













@JF Meier Do you mean spring-boot-starter-test rather than sg-cloud-starter-test? Are you looking at the tree at the top with the skyscanner dep?

– Ryan Dawson
Dec 10 '18 at 15:53






@JF Meier Do you mean spring-boot-starter-test rather than sg-cloud-starter-test? Are you looking at the tree at the top with the skyscanner dep?

– Ryan Dawson
Dec 10 '18 at 15:53













2 Answers
2






active

oldest

votes


















1














You can specify the version which you want to use with dependency org.json and use that dependency above the one which you don't want.






share|improve this answer
































    0














    A colleague of mine fixed this by entering the following exclusion ( but I don't understanf why it worked ):



    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <optional>true</optional>
    <exclusions>
    <exclusion>
    <groupId>com.vaadin.external.google</groupId>
    <artifactId>android-json</artifactId>
    </exclusion>
    </exclusions>
    </dependency>





    share|improve this answer






















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53260385%2fmaven-transient-dependency-library-jar-vaadin-json-is-not-being-excluded%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      You can specify the version which you want to use with dependency org.json and use that dependency above the one which you don't want.






      share|improve this answer





























        1














        You can specify the version which you want to use with dependency org.json and use that dependency above the one which you don't want.






        share|improve this answer



























          1












          1








          1







          You can specify the version which you want to use with dependency org.json and use that dependency above the one which you don't want.






          share|improve this answer















          You can specify the version which you want to use with dependency org.json and use that dependency above the one which you don't want.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          answered Nov 12 '18 at 10:48


























          community wiki





          krishna Murari
























              0














              A colleague of mine fixed this by entering the following exclusion ( but I don't understanf why it worked ):



              <dependency>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-configuration-processor</artifactId>
              <optional>true</optional>
              <exclusions>
              <exclusion>
              <groupId>com.vaadin.external.google</groupId>
              <artifactId>android-json</artifactId>
              </exclusion>
              </exclusions>
              </dependency>





              share|improve this answer



























                0














                A colleague of mine fixed this by entering the following exclusion ( but I don't understanf why it worked ):



                <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-configuration-processor</artifactId>
                <optional>true</optional>
                <exclusions>
                <exclusion>
                <groupId>com.vaadin.external.google</groupId>
                <artifactId>android-json</artifactId>
                </exclusion>
                </exclusions>
                </dependency>





                share|improve this answer

























                  0












                  0








                  0







                  A colleague of mine fixed this by entering the following exclusion ( but I don't understanf why it worked ):



                  <dependency>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-configuration-processor</artifactId>
                  <optional>true</optional>
                  <exclusions>
                  <exclusion>
                  <groupId>com.vaadin.external.google</groupId>
                  <artifactId>android-json</artifactId>
                  </exclusion>
                  </exclusions>
                  </dependency>





                  share|improve this answer













                  A colleague of mine fixed this by entering the following exclusion ( but I don't understanf why it worked ):



                  <dependency>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-configuration-processor</artifactId>
                  <optional>true</optional>
                  <exclusions>
                  <exclusion>
                  <groupId>com.vaadin.external.google</groupId>
                  <artifactId>android-json</artifactId>
                  </exclusion>
                  </exclusions>
                  </dependency>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 10 '18 at 12:39









                  Menelaos BakopoulosMenelaos Bakopoulos

                  12.1k84299




                  12.1k84299



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53260385%2fmaven-transient-dependency-library-jar-vaadin-json-is-not-being-excluded%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kleinkühnau

                      Makov (Slowakei)

                      Deutsches Schauspielhaus