Can't resolve version conflict with dependencyManagement
My project has a version conflict in some library dependencies. An older version of apache beanutils appears "higher" up the dependency hierarchy and is winning out against a newer version, depended on transitively by another library dependency. Since I know beanutils is backward compatible, I'm using <dependencyManagement> in my root (parent) pom.xml to force a newer version.
At runtime, capsule is not taking the <dependencyManagement> information into consideration and using the "default" maven resolution logic as if the <dependencyManagement> wasn't locking in a different version.
The output of -Dcapsule.tree is
Dependencies for services-dist-0.13.0.3-SNAPSHOT-capsule
+--- com.acuitysds.services:services-auth:0.13.0.3-SNAPSHOT
| +--- com.acuitysds.services:services-common:0.13.0.3-SNAPSHOT
| | +--- com.acuitysds.model:data-model-config:0.13.0.3-SNAPSHOT
| | +--- com.acuitysds:common-aws:0.13.0.3-SNAPSHOT
| | +--- com.acuitysds.ae:ae-core:0.13.0.3-SNAPSHOT
| | +--- io.dropwizard:dropwizard-core:0.9.1
| | | +--- io.dropwizard:dropwizard-util:0.9.1
| | | +--- io.dropwizard:dropwizard-jackson:0.9.1
| | | +--- io.dropwizard:dropwizard-validation:0.9.1
| | | +--- io.dropwizard:dropwizard-configuration:0.9.1
| | | +--- io.dropwizard:dropwizard-logging:0.9.1
| | | +--- io.dropwizard:dropwizard-metrics:0.9.1
| | | | +--- io.dropwizard:dropwizard-lifecycle:0.9.1
| | | | +--- io.dropwizard:dropwizard-jackson:0.9.1 (*)
| | | | +--- io.dropwizard:dropwizard-validation:0.9.1 (*)
| | | | +--- io.dropwizard.metrics:metrics-core:3.1.2
| | | | \--- org.slf4j:slf4j-api:1.7.12
| | | +--- io.dropwizard:dropwizard-jersey:0.9.1
| | | | +--- io.dropwizard:dropwizard-jackson:0.9.1 (*)
| | | | +--- io.dropwizard:dropwizard-validation:0.9.1 (*)
| | | | +--- io.dropwizard:dropwizard-logging:0.9.1 (*)
| | | | +--- org.glassfish.jersey.core:jersey-server:2.22.1
| | | | | +--- org.glassfish.jersey.core:jersey-common:2.22.1
| | | | | +--- org.glassfish.jersey.core:jersey-client:2.22.1
| | | | | +--- javax.ws.rs:javax.ws.rs-api:2.0.1
| | | | | +--- org.glassfish.jersey.media:jersey-media-jaxb:2.22.1
| | | | | | +--- org.glassfish.jersey.core:jersey-common:2.22.1 (*)
| | | | | | +--- org.glassfish.hk2:hk2-api:2.4.0-b31
| | | | | | +--- org.glassfish.hk2.external:javax.inject:2.4.0-b31
| | | | | | +--- org.glassfish.hk2:hk2-locator:2.4.0-b31
| | | | | | \--- org.glassfish.hk2:osgi-resource-locator:1.0.1
| | | | | +--- javax.annotation:javax.annotation-api:1.2
| | | | | +--- org.glassfish.hk2:hk2-api:2.4.0-b31 (*)
| | | | | +--- org.glassfish.hk2.external:javax.inject:2.4.0-b31 (*)
| | | | | +--- org.glassfish.hk2:hk2-locator:2.4.0-b31 (*)
| | | | | \--- javax.validation:validation-api:1.1.0.Final
| | | | +--- org.glassfish.jersey.ext:jersey-metainf-services:2.22.1
| | | | | +--- org.glassfish.jersey.core:jersey-common:2.22.1 (*)
| | | | | \--- javax.ws.rs:javax.ws.rs-api:2.0.1 (*)
| | | | +--- org.glassfish.jersey.ext:jersey-bean-validation:2.22.1
| | | | | +--- org.glassfish.hk2.external:javax.inject:2.4.0-b31 (*)
| | | | | +--- org.glassfish.jersey.core:jersey-common:2.22.1 (*)
| | | | | +--- org.glassfish.jersey.core:jersey-server:2.22.1 (*)
| | | | | +--- javax.validation:validation-api:1.1.0.Final (*)
| | | | | \--- javax.ws.rs:javax.ws.rs-api:2.0.1 (*)
| | | | +--- io.dropwizard.metrics:metrics-jersey2:3.1.2
| | | | | +--- io.dropwizard.metrics:metrics-core:3.1.2 (*)
| | | | | \--- io.dropwizard.metrics:metrics-annotation:3.1.2
| | | | +--- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.6.3
| | | | | +--- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.6.3
| | | | | \--- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.6.3
| | | | +--- org.glassfish.jersey.containers:jersey-container-servlet:2.22.1
| | | | | +--- org.glassfish.jersey.containers:jersey-container-servlet-core:2.22.1
| | | | | | +--- org.glassfish.hk2.external:javax.inject:2.4.0-b31 (*)
| | | | | | +--- org.glassfish.jersey.core:jersey-common:2.22.1 (*)
| | | | | | +--- org.glassfish.jersey.core:jersey-server:2.22.1 (*)
| | | | | | \--- javax.ws.rs:javax.ws.rs-api:2.0.1 (*)
| | | | | +--- org.glassfish.jersey.core:jersey-common:2.22.1 (*)
| | | | | +--- org.glassfish.jersey.core:jersey-server:2.22.1 (*)
| | | | | \--- javax.ws.rs:javax.ws.rs-api:2.0.1 (*)
| | | | +--- org.eclipse.jetty:jetty-server:9.2.13.v20150730
| | | | | +--- javax.servlet:javax.servlet-api:3.1.0
| | | | | +--- org.eclipse.jetty:jetty-http:9.2.13.v20150730
| | | | | \--- org.eclipse.jetty:jetty-io:9.2.13.v20150730
| | | | | \--- org.eclipse.jetty:jetty-util:9.2.13.v20150730
| | | | +--- org.eclipse.jetty:jetty-webapp:9.2.13.v20150730
| | | | | +--- org.eclipse.jetty:jetty-xml:9.2.13.v20150730
| | | | | | \--- org.eclipse.jetty:jetty-util:9.2.13.v20150730 (*)
| | | | | \--- org.eclipse.jetty:jetty-servlet:9.2.13.v20150730
| | | | +--- org.eclipse.jetty:jetty-continuation:9.2.13.v20150730
| | | | \--- org.apache.commons:commons-lang3:3.4
| | | +--- io.dropwizard:dropwizard-servlets:0.9.1
| | | +--- io.dropwizard:dropwizard-jetty:0.9.1
| | | | +--- io.dropwizard:dropwizard-logging:0.9.1 (*)
| | | | +--- io.dropwizard.metrics:metrics-jetty9:3.1.2
| | | | | \--- io.dropwizard.metrics:metrics-core:3.1.2 (*)
| | | | +--- org.eclipse.jetty:jetty-server:9.2.13.v20150730 (*)
| | | | +--- org.eclipse.jetty:jetty-servlet:9.2.13.v20150730 (*)
| | | | +--- org.eclipse.jetty:jetty-servlets:9.2.13.v20150730
| | | | | +--- org.eclipse.jetty:jetty-continuation:9.2.13.v20150730 (*)
| | | | | +--- org.eclipse.jetty:jetty-http:9.2.13.v20150730 (*)
| | | | | +--- org.eclipse.jetty:jetty-util:9.2.13.v20150730 (*)
| | | | | \--- org.eclipse.jetty:jetty-io:9.2.13.v20150730 (*)
| | | | \--- org.eclipse.jetty:jetty-http:9.2.13.v20150730 (*)
| | | +--- io.dropwizard:dropwizard-lifecycle:0.9.1 (*)
| | | +--- io.dropwizard.metrics:metrics-core:3.1.2 (*)
| | | +--- io.dropwizard.metrics:metrics-jvm:3.1.2
| | | | \--- io.dropwizard.metrics:metrics-core:3.1.2 (*)
| | | +--- io.dropwizard.metrics:metrics-servlets:3.1.2
| | | | +--- io.dropwizard.metrics:metrics-core:3.1.2 (*)
| | | | +--- io.dropwizard.metrics:metrics-healthchecks:3.1.2
| | | | +--- io.dropwizard.metrics:metrics-json:3.1.2
| | | | | \--- io.dropwizard.metrics:metrics-core:3.1.2 (*)
| | | | \--- io.dropwizard.metrics:metrics-jvm:3.1.2 (*)
| | | +--- io.dropwizard.metrics:metrics-healthchecks:3.1.2 (*)
| | | +--- net.sourceforge.argparse4j:argparse4j:0.6.0
| | | \--- org.eclipse.jetty.toolchain.setuid:jetty-setuid-java:1.0.3
| | +--- io.dropwizard:dropwizard-client:0.9.1
| | | +--- io.dropwizard:dropwizard-core:0.9.1 (*)
| | | +--- org.glassfish.jersey.core:jersey-client:2.22.1 (*)
| | | +--- org.apache.httpcomponents:httpclient:4.5.1
| | | +--- io.dropwizard.metrics:metrics-httpclient:3.1.2
| | | | \--- io.dropwizard.metrics:metrics-core:3.1.2 (*)
| | | \--- org.glassfish.jersey.connectors:jersey-apache-connector:2.22.1
| | | +--- org.glassfish.jersey.core:jersey-common:2.22.1 (*)
| | | +--- org.glassfish.jersey.core:jersey-client:2.22.1 (*)
| | | \--- javax.ws.rs:javax.ws.rs-api:2.0.1 (*)
| | +--- io.dropwizard:dropwizard-auth:0.9.1
| | | \--- io.dropwizard:dropwizard-core:0.9.1 (*)
| | +--- io.dropwizard:dropwizard-assets:0.9.1
| | +--- com.hubspot.dropwizard:dropwizard-guice:0.8.3.0
| | | +--- com.google.code.findbugs:annotations:3.0.0
| | | +--- io.dropwizard:dropwizard-core:0.8.3 -> 0.9.1
| | | +--- io.dropwizard:dropwizard-jackson:0.8.3 -> 0.9.1
| | | +--- io.dropwizard:dropwizard-jersey:0.8.3 -> 0.9.1
| | | +--- io.dropwizard:dropwizard-jetty:0.8.3 -> 0.9.1
| | | +--- io.dropwizard:dropwizard-lifecycle:0.8.3 -> 0.9.1
| | | +--- io.dropwizard:dropwizard-servlets:0.8.3 -> 0.9.1
| | | +--- io.dropwizard.metrics:metrics-healthchecks:3.1.2 (*)
| | | +--- com.google.inject:guice:4.0
| | | +--- com.google.inject.extensions:guice-servlet:4.0
| | | +--- com.squarespace.jersey2-guice:jersey2-guice:0.10
| | | | +--- com.google.inject.extensions:guice-multibindings:4.0
| | | | \--- com.google.inject.extensions:guice-servlet:4.0 (*)
| | | +--- org.reflections:reflections:0.9.9
| | | +--- javax.servlet:javax.servlet-api:3.1.0 (*)
| | | +--- javax.inject:javax.inject:1
| | | +--- org.slf4j:slf4j-api:1.7.12 (*)
| | | +--- javax.ws.rs:javax.ws.rs-api:2.0.1 (*)
| | | \--- com.google.guava:guava:18.0 -> 20.0
| | +--- com.theoryinpractise:halbuilder-standard:4.0.1
| | | +--- com.theoryinpractise:halbuilder-api:4.0.1
| | | +--- com.theoryinpractise:halbuilder-core:4.0.6
| | | | +--- com.theoryinpractise:halbuilder-api:4.0.1 (*)
| | | | +--- com.google.guava:guava:17.0 -> 20.0
| | | | \--- com.google.code.findbugs:jsr305:3.0.0 -> 1.3.9
| | | +--- com.theoryinpractise:halbuilder-json:4.0.6
| | | | +--- com.theoryinpractise:halbuilder-api:4.0.1 (*)
| | | | +--- com.theoryinpractise:halbuilder-core:4.0.1 -> 4.0.6
| | | | +--- com.google.guava:guava:18.0 -> 20.0 (*)
| | | | +--- com.fasterxml.jackson.core:jackson-core:2.8.1 -> 2.6.3
| | | | \--- com.fasterxml.jackson.core:jackson-databind:2.8.1 -> 2.6.3
| | | \--- com.theoryinpractise:halbuilder-xml:4.0.1
| | | +--- com.theoryinpractise:halbuilder-api:4.0.1 (*)
| | | +--- com.theoryinpractise:halbuilder-core:4.0.1 -> 4.0.6 (*)
| | | +--- org.jdom:jdom:2.0.2
| | | \--- com.google.guava:guava:17.0 -> 20.0 (*)
| | +--- com.google.inject:guice:4.0 (*)
| | +--- com.google.inject.extensions:guice-servlet:4.0 (*)
| | +--- com.google.code.findbugs:annotations:3.0.0 (*)
| | +--- ch.qos.logback.contrib:logback-json-classic:0.1.2
| | \--- ch.qos.logback.contrib:logback-jackson:0.1.2
| +--- com.acuitysds:common-sfdc:0.13.0.3-SNAPSHOT
| | +--- com.google.inject:guice:4.0 (*)
| | +--- com.force.api:force-wsc:35.2.6
| | | +--- org.antlr:ST4:4.0.7
| | | | \--- org.antlr:antlr-runtime:3.5
| | | | \--- org.antlr:stringtemplate:3.2.1
| | | | \--- antlr:antlr:2.7.7
| | | +--- org.codehaus.jackson:jackson-core-asl:1.9.13
| | | +--- org.codehaus.jackson:jackson-mapper-asl:1.9.13
| | | | \--- org.codehaus.jackson:jackson-core-asl:1.9.13 (*)
| | | \--- commons-beanutils:commons-beanutils:1.7.0
| | +--- com.google.guava:guava:20.0
| | +--- io.dropwizard:dropwizard-jackson:0.9.1 (*)
| | +--- org.apache.httpcomponents:httpcore:4.4.3
| | +--- org.apache.httpcomponents:httpclient:4.5.1 (*)
| | \--- org.slf4j:slf4j-api:1.7.5 -> 1.7.12
| +--- com.acuitysds:common-guice:0.13.0.3-SNAPSHOT
| | +--- com.google.inject:guice:4.0 (*)
| | +--- com.google.inject.extensions:guice-multibindings:4.0 (*)
| | +--- com.google.guava:guava:20.0 (*)
| | +--- org.slf4j:slf4j-api:1.7.5 -> 1.7.12 (*)
| | \--- javax.ws.rs:javax.ws.rs-api:2.0.1 (*)
| +--- com.acuitysds:common-datomic:0.13.0.3-SNAPSHOT
| | +--- com.datomic:datomic-pro:0.9.5544
| | | +--- org.clojure:clojure:1.8.0
| | | +--- org.clojure:tools.cli:0.3.5
| | | +--- org.fressian:fressian:0.6.5
| | | +--- commons-codec:commons-codec:1.5 -> 1.9
| | | +--- org.slf4j:jul-to-slf4j:1.7.7 -> 1.7.12
| | | +--- org.slf4j:log4j-over-slf4j:1.7.7 -> 1.7.12
| | | +--- org.slf4j:jcl-over-slf4j:1.7.7 -> 1.7.12
| | | +--- org.apache.activemq:artemis-core-client:1.4.0
| | | | +--- org.apache.activemq:artemis-commons:1.4.0
| | | | | +--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.2.1.Final
| | | | | +--- io.netty:netty-all:4.0.39.Final
| | | | | +--- commons-beanutils:commons-beanutils:1.9.2 -> 1.7.0
| | | | | \--- com.google.guava:guava:18.0 -> 20.0 (*)
| | | | +--- io.netty:netty-all:4.0.39.Final (*)
| | | | +--- org.apache.geronimo.specs:geronimo-json_1.0_spec:1.0-alpha-1
| | | | \--- org.apache.johnzon:johnzon-core:0.9.4
| | | +--- com.h2database:h2:1.3.171
| | | +--- com.datomic:datomic-lucene-core:3.3.0
| | | +--- com.google.guava:guava:18.0 -> 20.0 (*)
| | | +--- net.spy:spymemcached:2.11.4
| | | +--- org.apache.httpcomponents:httpclient:4.5.2 -> 4.5.1
| | | +--- org.apache.tomcat:tomcat-jdbc:7.0.27
| | | | \--- org.apache.tomcat:tomcat-juli:7.0.27
| | | \--- org.codehaus.janino:commons-compiler-jdk:2.6.1
| | | \--- org.codehaus.janino:commons-compiler:2.6.1
| | +--- com.amazonaws:aws-java-sdk-dynamodb:1.10.75
| | | +--- com.amazonaws:aws-java-sdk-s3:1.10.75
| | | \--- com.amazonaws:aws-java-sdk-core:1.10.75
| | | +--- commons-logging:commons-logging:1.1.3
| | | +--- org.apache.httpcomponents:httpclient:4.3.6 -> 4.5.1
| | | +--- org.apache.httpcomponents:httpcore:4.3.3 -> 4.4.3
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.5.3 -> 2.6.3
| | | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.5.3
| | | | \--- com.fasterxml.jackson.core:jackson-core:2.5.3 -> 2.6.3
| | | \--- joda-time:joda-time:2.8.1 -> 2.9.2
| | +--- com.google.inject:guice:4.0 (*)
| | +--- io.dropwizard:dropwizard-jackson:0.9.1 (*)
| | +--- com.google.inject.extensions:guice-multibindings:4.0 (*)
| | +--- junit:junit:4.11
| | | \--- org.hamcrest:hamcrest-core:1.3
| | +--- joda-time:joda-time:2.9.2
| | +--- us.bpsm:edn-java:0.4.6
| | +--- org.easytesting:fest-assert-core:2.0M10
| | | \--- org.easytesting:fest-util:1.2.5
| | \--- org.jetbrains:annotations-java5:15.0
| +--- com.acuitysds.model:data-model-common:0.13.0.3-SNAPSHOT
| | +--- joda-time:joda-time:2.9.2 (*)
| | +--- com.google.guava:guava:20.0 (*)
| | +--- com.acuitysds:common-datomic:0.13.0.3-SNAPSHOT (*)
| | +--- io.dropwizard:dropwizard-jackson:0.9.1 (*)
| | +--- io.dropwizard:dropwizard-validation:0.9.1 (*)
| | +--- com.google.code.findbugs:annotations:3.0.0 (*)
| | \--- org.easytesting:fest-assert-core:2.0M10 (*)
| +--- io.dropwizard:dropwizard-assets:0.9.1 (*)
| +--- com.auth0:java-jwt:2.0.1
| \--- commons-codec:commons-codec:1.4 -> 1.9
+--- commons-codec:commons-codec:1.9
+--- com.acuitysds.services:services-admin-ui:0.13.0.3-SNAPSHOT
+--- com.jamierf.dropwizard:dropwizard-logging-loggly:0.7
| +--- io.dropwizard:dropwizard-logging:0.9.1 (*)
| +--- ch.qos.logback.contrib:logback-json-classic:0.1.2 (*)
| +--- ch.qos.logback.contrib:logback-jackson:0.1.2 (*)
| \--- org.logback-extensions:logback-ext-loggly:0.1.2
+--- io.dropwizard:dropwizard-logging:0.9.1
| +--- io.dropwizard:dropwizard-jackson:0.9.1 (*)
| +--- io.dropwizard:dropwizard-validation:0.9.1 (*)
| +--- io.dropwizard.metrics:metrics-logback:3.1.2
| | \--- io.dropwizard.metrics:metrics-core:3.1.2 (*)
| +--- org.slf4j:slf4j-api:1.7.12 (*)
| +--- org.slf4j:jul-to-slf4j:1.7.12
| | \--- org.slf4j:slf4j-api:1.7.12 (*)
| +--- ch.qos.logback:logback-core:1.1.3
| +--- ch.qos.logback:logback-classic:1.1.3
| | \--- ch.qos.logback:logback-core:1.1.3 (*)
| +--- org.slf4j:log4j-over-slf4j:1.7.12
| | \--- org.slf4j:slf4j-api:1.7.12 (*)
| +--- org.slf4j:jcl-over-slf4j:1.7.12
| | \--- org.slf4j:slf4j-api:1.7.12 (*)
| \--- org.eclipse.jetty:jetty-util:9.2.13.v20150730 (*)
+--- com.acuitysds.services:services-session:0.13.0.3-SNAPSHOT
| +--- com.acuitysds.services:services-common:0.13.0.3-SNAPSHOT (*)
| +--- com.tdunning:t-digest:2.0.2
| +--- org.apache.commons:commons-math3:3.3
| +--- com.acuitysds.di:data-integration-core:0.13.0.3-SNAPSHOT
| | +--- com.acuitysds.model:data-model-common:0.13.0.3-SNAPSHOT (*)
| | +--- com.acuitysds.model:data-model-config:0.13.0.3-SNAPSHOT (*)
| | +--- com.acuitysds.model:data-model-message:0.13.0.3-SNAPSHOT
| | | \--- com.acuitysds.model:data-model-common:0.13.0.3-SNAPSHOT (*)
| | +--- com.acuitysds:common-guice:0.13.0.3-SNAPSHOT (*)
| | +--- com.acuitysds:common-datomic:0.13.0.3-SNAPSHOT (*)
| | +--- com.acuitysds:common-aws:0.13.0.3-SNAPSHOT (*)
| | +--- org.apache.commons:commons-math3:3.3 (*)
| | \--- com.google.code.findbugs:annotations:3.0.0 (*)
| +--- com.acuitysds.di:data-integration-sfdc:0.13.0.3-SNAPSHOT
| | +--- com.acuitysds.di:data-integration-sales:0.13.0.3-SNAPSHOT
| | +--- com.acuitysds.model:data-model-config:0.13.0.3-SNAPSHOT (*)
| | \--- com.acuitysds:common-sfdc:0.13.0.3-SNAPSHOT (*)
| +--- com.acuitysds:common-datomic:0.13.0.3-SNAPSHOT (*)
| +--- com.acuitysds.model:data-model-sales:0.13.0.3-SNAPSHOT
| | +--- com.acuitysds.model:data-model-common:0.13.0.3-SNAPSHOT (*)
| | +--- joda-time:joda-time:2.9.2 (*)
| | \--- com.google.guava:guava:20.0 (*)
| +--- com.acuitysds.ae:ae-core:0.13.0.3-SNAPSHOT (*)
| +--- redis.clients:jedis:2.1.0
| | \--- commons-pool:commons-pool:1.5.5
| +--- org.apache.poi:poi:3.12
| | \--- commons-codec:commons-codec:1.9
| \--- org.apache.poi:poi-ooxml:3.12
| +--- org.apache.poi:poi:3.12 (*)
| \--- org.apache.poi:poi-ooxml-schemas:3.12
| \--- org.apache.xmlbeans:xmlbeans:2.6.0
| \--- stax:stax-api:1.0.1
+--- com.acuitysds.services:services-admin:0.13.0.3-SNAPSHOT
| \--- com.acuitysds.services:services-common:0.13.0.3-SNAPSHOT (*)
\--- com.acuitysds.services:services-ops:0.13.0.3-SNAPSHOT
+--- com.acuitysds.services:services-common:0.13.0.3-SNAPSHOT (*)
+--- com.acuitysds.ae:ae-core:0.13.0.3-SNAPSHOT (*)
+--- com.acuitysds:common-aws:0.13.0.3-SNAPSHOT (*)
+--- com.acuitysds.model:data-model-config:0.13.0.3-SNAPSHOT (*)
+--- com.acuitysds.di:data-integration-sfdc:0.13.0.3-SNAPSHOT (*)
+--- com.acuitysds.di:data-integration-sales:0.13.0.3-SNAPSHOT (*)
+--- com.acuitysds:common-sfdc:0.13.0.3-SNAPSHOT (*)
+--- com.acuitysds:common-datomic:0.13.0.3-SNAPSHOT (*)
+--- com.github.spullara.mustache.java:compiler:0.8.16
| \--- com.google.guava:guava:16.0.1 -> 20.0
\--- cglib:cglib-nodep:2.2.2
While the output of mvn dependency:tree for the capsule module produces the expected result:
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ services-dist ---
[INFO] com.acuitysds.services:services-dist:jar:0.13.0.3-SNAPSHOT
[INFO] +- com.acuitysds.services:services-auth:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | +- com.acuitysds.services:services-common:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | +- io.dropwizard:dropwizard-client:jar:0.9.1:compile
[INFO] | | | +- io.dropwizard.metrics:metrics-httpclient:jar:3.1.2:compile
[INFO] | | | \- org.glassfish.jersey.connectors:jersey-apache-connector:jar:2.22.1:compile
[INFO] | | +- io.dropwizard:dropwizard-auth:jar:0.9.1:compile
[INFO] | | +- com.hubspot.dropwizard:dropwizard-guice:jar:0.8.3.0:compile
[INFO] | | | +- com.squarespace.jersey2-guice:jersey2-guice:jar:0.10:compile
[INFO] | | | +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] | | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | | +- com.theoryinpractise:halbuilder-standard:jar:4.0.1:compile
[INFO] | | | +- com.theoryinpractise:halbuilder-api:jar:4.0.1:compile (version selected from constraint [4.0.0,5.0.0))
[INFO] | | | +- com.theoryinpractise:halbuilder-core:jar:4.0.6:compile (version selected from constraint [4.0.0,5.0.0))
[INFO] | | | +- com.theoryinpractise:halbuilder-json:jar:4.0.6:compile (version selected from constraint [4.0.0,5.0.0))
[INFO] | | | \- com.theoryinpractise:halbuilder-xml:jar:4.0.1:compile (version selected from constraint [4.0.0,5.0.0))
[INFO] | | | \- org.jdom:jdom:jar:2.0.2:compile
[INFO] | | +- com.google.inject:guice:jar:4.0:compile
[INFO] | | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | | +- com.google.inject.extensions:guice-servlet:jar:4.0:compile
[INFO] | | \- com.google.code.findbugs:annotations:jar:3.0.0:compile
[INFO] | +- com.acuitysds:common-sfdc:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | +- com.force.api:force-wsc:jar:35.2.6:compile
[INFO] | | | +- org.antlr:ST4:jar:4.0.7:compile
[INFO] | | | | \- org.antlr:antlr-runtime:jar:3.5:compile
[INFO] | | | | \- org.antlr:stringtemplate:jar:3.2.1:compile
[INFO] | | | | \- antlr:antlr:jar:2.7.7:compile
[INFO] | | | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | | | \- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | | | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | | +- com.google.guava:guava:jar:20.0:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.3:compile
[INFO] | | \- org.apache.httpcomponents:httpclient:jar:4.5.1:compile
[INFO] | +- com.acuitysds:common-guice:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | +- com.google.inject.extensions:guice-multibindings:jar:4.0:compile
[INFO] | | \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] | +- com.acuitysds:common-datomic:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | +- com.datomic:datomic-pro:jar:0.9.5544:compile
[INFO] | | | +- org.clojure:clojure:jar:1.8.0:compile
[INFO] | | | +- org.clojure:tools.cli:jar:0.3.5:compile
[INFO] | | | +- org.fressian:fressian:jar:0.6.5:compile
[INFO] | | | +- org.apache.activemq:artemis-core-client:jar:1.4.0:compile
[INFO] | | | | +- org.apache.activemq:artemis-commons:jar:1.4.0:compile
[INFO] | | | | +- io.netty:netty-all:jar:4.0.39.Final:compile
[INFO] | | | | +- org.apache.geronimo.specs:geronimo-json_1.0_spec:jar:1.0-alpha-1:compile
[INFO] | | | | \- org.apache.johnzon:johnzon-core:jar:0.9.4:compile
[INFO] | | | +- com.h2database:h2:jar:1.3.171:compile
[INFO] | | | +- com.datomic:datomic-lucene-core:jar:3.3.0:compile
[INFO] | | | +- net.spy:spymemcached:jar:2.11.4:compile
[INFO] | | | +- org.apache.tomcat:tomcat-jdbc:jar:7.0.27:compile
[INFO] | | | | \- org.apache.tomcat:tomcat-juli:jar:7.0.27:compile
[INFO] | | | \- org.codehaus.janino:commons-compiler-jdk:jar:2.6.1:compile
[INFO] | | | \- org.codehaus.janino:commons-compiler:jar:2.6.1:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-dynamodb:jar:1.10.75:compile
[INFO] | | | \- com.amazonaws:aws-java-sdk-core:jar:1.10.75:compile
[INFO] | | | +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] | | | \- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.5.3:compile
[INFO] | | +- joda-time:joda-time:jar:2.9.2:compile
[INFO] | | +- us.bpsm:edn-java:jar:0.4.6:compile
[INFO] | | +- org.easytesting:fest-assert-core:jar:2.0M10:test
[INFO] | | | \- org.easytesting:fest-util:jar:1.2.5:test
[INFO] | | \- org.jetbrains:annotations-java5:jar:15.0:compile
[INFO] | +- com.acuitysds.model:data-model-common:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | +- io.dropwizard:dropwizard-assets:jar:0.9.1:compile
[INFO] | | \- io.dropwizard:dropwizard-servlets:jar:0.9.1:compile
[INFO] | | \- io.dropwizard.metrics:metrics-annotation:jar:3.1.2:compile
[INFO] | \- com.auth0:java-jwt:jar:2.0.1:compile
[INFO] +- com.acuitysds.services:services-session:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | +- com.tdunning:t-digest:jar:2.0.2:compile
[INFO] | +- org.apache.commons:commons-math3:jar:3.3:compile
[INFO] | +- com.acuitysds.di:data-integration-core:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | \- com.acuitysds.model:data-model-message:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | +- com.acuitysds.di:data-integration-sfdc:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | +- com.acuitysds.model:data-model-sales:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | +- com.acuitysds.ae:ae-core:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | | +- com.acuitysds.model:data-model-ml:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | +- com.atlassian.rserve:rserve-client:jar:0.0.1-RC1:compile
[INFO] | | +- org.parboiled:parboiled-java:jar:1.1.4:compile
[INFO] | | | +- org.parboiled:parboiled-core:jar:1.1.4:compile
[INFO] | | | +- org.ow2.asm:asm:jar:4.1:compile
[INFO] | | | +- org.ow2.asm:asm-tree:jar:4.1:compile
[INFO] | | | +- org.ow2.asm:asm-analysis:jar:4.1:compile
[INFO] | | | \- org.ow2.asm:asm-util:jar:4.1:compile
[INFO] | | \- org.reflections:reflections:jar:0.9.9:compile
[INFO] | | \- org.javassist:javassist:jar:3.18.2-GA:compile
[INFO] | +- redis.clients:jedis:jar:2.1.0:compile
[INFO] | | \- commons-pool:commons-pool:jar:1.5.5:compile
[INFO] | +- org.apache.poi:poi:jar:3.12:compile
[INFO] | \- org.apache.poi:poi-ooxml:jar:3.12:compile
[INFO] | \- org.apache.poi:poi-ooxml-schemas:jar:3.12:compile
[INFO] | \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] | \- stax:stax-api:jar:1.0.1:compile
[INFO] +- com.acuitysds.services:services-ops:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | +- com.acuitysds:common-aws:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-s3:jar:1.10.75:compile
[INFO] | | | \- com.amazonaws:aws-java-sdk-kms:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-sqs:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-ses:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-cloudformation:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-route53:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-opsworks:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-swf-libraries:jar:1.10.75:compile
[INFO] | | | \- com.amazonaws:aws-java-sdk-simpleworkflow:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-iam:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-elasticloadbalancing:jar:1.10.75:compile
[INFO] | | +- com.amazonaws:aws-java-sdk-ec2:jar:1.10.75:compile
[INFO] | | \- com.amazonaws:aws-java-sdk-autoscaling:jar:1.10.75:compile
[INFO] | +- com.acuitysds.model:data-model-config:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | | \- io.dropwizard:dropwizard-configuration:jar:0.9.1:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.6.3:compile
[INFO] | | | \- org.yaml:snakeyaml:jar:1.15:compile
[INFO] | | \- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] | +- com.acuitysds.di:data-integration-sales:jar:0.13.0.3-SNAPSHOT:compile
[INFO] | +- com.github.spullara.mustache.java:compiler:jar:0.8.16:compile
[INFO] | \- cglib:cglib-nodep:jar:2.2.2:compile
[INFO] +- com.acuitysds.services:services-admin:jar:0.13.0.3-SNAPSHOT:compile
[INFO] +- com.acuitysds.services:services-admin-ui:jar:0.13.0.3-SNAPSHOT:compile
[INFO] +- commons-codec:commons-codec:jar:1.9:compile
[INFO] +- com.jamierf.dropwizard:dropwizard-logging-loggly:jar:0.7:compile
[INFO] | +- ch.qos.logback.contrib:logback-json-classic:jar:0.1.2:compile
[INFO] | | \- ch.qos.logback.contrib:logback-json-core:jar:0.1.2:compile
[INFO] | +- ch.qos.logback.contrib:logback-jackson:jar:0.1.2:compile
[INFO] | \- org.logback-extensions:logback-ext-loggly:jar:0.1.2:compile
[INFO] +- io.dropwizard:dropwizard-logging:jar:0.9.1:compile
[INFO] | +- io.dropwizard:dropwizard-jackson:jar:0.9.1:compile
[INFO] | | +- io.dropwizard:dropwizard-util:jar:0.9.1:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.6.1:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.1:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.1:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk7:jar:2.6.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.6.3:compile
[INFO] | | +- com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.6.3:compile
[INFO] | | \- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.6.3:compile
[INFO] | +- io.dropwizard:dropwizard-validation:jar:0.9.1:compile
[INFO] | | +- org.hibernate:hibernate-validator:jar:5.2.2.Final:compile
[INFO] | | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | | +- org.jboss.logging:jboss-logging:jar:3.2.1.Final:compile
[INFO] | | | \- com.fasterxml:classmate:jar:1.1.0:compile
[INFO] | | \- org.glassfish:javax.el:jar:3.0.0:compile
[INFO] | +- io.dropwizard.metrics:metrics-logback:jar:3.1.2:compile
[INFO] | | \- io.dropwizard.metrics:metrics-core:jar:3.1.2:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] | +- org.slf4j:jul-to-slf4j:jar:1.7.12:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.0.13:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.0.13:compile
[INFO] | +- org.slf4j:log4j-over-slf4j:jar:1.7.12:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.5:compile
[INFO] | \- org.eclipse.jetty:jetty-util:jar:9.2.13.v20150730:compile
[INFO] \- io.dropwizard:dropwizard-testing:jar:0.9.1:test
[INFO] +- io.dropwizard:dropwizard-core:jar:0.9.1:compile
[INFO] | +- io.dropwizard:dropwizard-metrics:jar:0.9.1:compile
[INFO] | +- io.dropwizard:dropwizard-jersey:jar:0.9.1:compile
[INFO] | | +- org.glassfish.jersey.ext:jersey-metainf-services:jar:2.22.1:compile
[INFO] | | +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.22.1:compile
[INFO] | | +- io.dropwizard.metrics:metrics-jersey2:jar:3.1.2:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.6.3:compile
[INFO] | | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.6.3:compile
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.6.3:compile
[INFO] | | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.22.1:compile
[INFO] | | +- org.eclipse.jetty:jetty-server:jar:9.2.13.v20150730:compile
[INFO] | | | \- org.eclipse.jetty:jetty-io:jar:9.2.13.v20150730:compile
[INFO] | | +- org.eclipse.jetty:jetty-webapp:jar:9.2.13.v20150730:compile
[INFO] | | | \- org.eclipse.jetty:jetty-xml:jar:9.2.13.v20150730:compile
[INFO] | | \- org.eclipse.jetty:jetty-continuation:jar:9.2.13.v20150730:compile
[INFO] | +- io.dropwizard:dropwizard-jetty:jar:0.9.1:compile
[INFO] | | +- io.dropwizard.metrics:metrics-jetty9:jar:3.1.2:compile
[INFO] | | +- org.eclipse.jetty:jetty-servlet:jar:9.2.13.v20150730:compile
[INFO] | | | \- org.eclipse.jetty:jetty-security:jar:9.2.13.v20150730:compile
[INFO] | | +- org.eclipse.jetty:jetty-servlets:jar:9.2.13.v20150730:compile
[INFO] | | \- org.eclipse.jetty:jetty-http:jar:9.2.13.v20150730:compile
[INFO] | +- io.dropwizard:dropwizard-lifecycle:jar:0.9.1:compile
[INFO] | +- io.dropwizard.metrics:metrics-jvm:jar:3.1.2:compile
[INFO] | +- io.dropwizard.metrics:metrics-servlets:jar:3.1.2:compile
[INFO] | | \- io.dropwizard.metrics:metrics-json:jar:3.1.2:compile
[INFO] | +- io.dropwizard.metrics:metrics-healthchecks:jar:3.1.2:compile
[INFO] | +- net.sourceforge.argparse4j:argparse4j:jar:0.6.0:compile
[INFO] | \- org.eclipse.jetty.toolchain.setuid:jetty-setuid-java:jar:1.0.3:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] +- org.objenesis:objenesis:jar:2.2:test
[INFO] +- org.assertj:assertj-core:jar:2.2.0:test
[INFO] \- org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-inmemory:jar:2.22.1:test
[INFO] +- org.glassfish.jersey.test-framework:jersey-test-framework-core:jar:2.22.1:test
[INFO] | \- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.1:compile
[INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.22.1:compile
[INFO] | +- org.glassfish.jersey.core:jersey-common:jar:2.22.1:compile
[INFO] | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.1:compile
[INFO] | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.1:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b31:compile
[INFO] | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b31:compile
[INFO] | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b31:compile
[INFO] | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b31:compile
[INFO] | \- org.glassfish.hk2:hk2-locator:jar:2.4.0-b31:compile
[INFO] +- org.glassfish.jersey.core:jersey-client:jar:2.22.1:compile
[INFO] \- org.ow2.asm:asm-debug-all:jar:5.0.4:test
The <dependencyManagement> section of the pom.xml for the (shared) grandparent of com.acuitysds:common-sfdc and com.acuitysds:common-datomic contains:
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.3</version>
</dependency>
As you can see in the trees above, the capsule version includes beanutils 1.7.0 while the maven output includes beanutils 1.9.3.
Are you using the new support for parent POMs? The way I programmed it, an "inlined" version wins over a version in dependency management. Should the logic be different? Does dependency management in the highest parent override everything beneath it?
I attempted to get the latest SNAPSHOTs before reporting this...are capsule-1.0.4-20161222.140832-12.jar and capsule-maven-1.0.4-20161222.224038-16.jar including that support?
I'm not sure what you mean by "inlined" version. Dependency management should win over what a transitive dependency wants. Dependency management should be evaluated using the effective pom (i.e. the pom and everything it inherits from it's parent, parent's parent, etc) of the artifact declaring the dependency.
So in the case above com.acuitysds:common-sfdc declares a dependency on com.force.api:force-wsc which in turn depends on one version of beanutils and com.acuitysds:common-datomic depends on com.datomic:datomic-pro which (through multiple transitive jumps) depends on a newer beanutils.
Now, both com.acuitysds:common-sfdc and com.acuitysds:common-datomic have a shared parent pom com.acuitysds:common which itself has a parent com.acuitysds:platform. It is in com.acuitysds:platform that the <dependencyManagement> section is declared. Through pom inhtrieitence both com.acuitysds:common-sfdc and com.acuitysds:common-datomic effectively have that same <dependencyManagement> (technically a merged view of what is locally defined and what is in the parent, although that isn't applicable here). And that is what should "win" the version conflict resolution fight since it is closest to where the dependencies root out of.
Two different things are handled very differently in Capsule. The embedded pom itself (and its management etc.), and poms of dependencies (including transitive dependencies). The former must be done in Capsule manually; the latter should be taken care of automatically by Aether.
If the problems you're seeing have to do with options that are managed by the dependencies and have nothing to do with the embedded pom, then this might be due to this Maven bug.
Also, I need an explanation of how dependency management works not for transitive dependencies, but for child poms. If a dependency is managed in the pom or in the parent, but a version is specified inline in the dependency, which takes precedence? If a dependency is managed in both a pom and its parent, which takes precedence?
I believe this should all be in the realm of aether, but maybe it is borderline?
I'm not using the embedded pom.xml, just directly listing the immediate dependencies of my project in the manifest. It is in the processes of resolving those artifacts' transitive dependencies that this issue comes up. Those dependencies happen to share a parent pom with my capsule project's pom, but I'm not relying on that.
On the question of dependencyManagement version vs. dependency version in the same pom.xml (or inherited from a parent, doesn't matter) then the inline dependency should win over dependency management. This shouldn't be relevant to my issue in particular since I don't specify any versions on the dependencies, relying on dependency management for that.
It is possible MNG-5761 is at play, I'm running maven 3.3.9 right now which is in the affected range. I'll have a look at my library's POMs to see if they are managing things differently, but it looks like Maven is doing the right thing while Capsule (via Aether) is having the problem.
Well, the new class they added (replacing ClassicDependencyManager), TransitiveDependencyManager, seems to address this very issue.
Unrelated, but you can try using an embedded pom again. I've added code to resolve the parent.
BTW, the Aether project seems to be moving to Apache where it will be maintained by the Maven team under the name "Maven Resolver".
I'm still hung up on why there would be a difference between mvn dependency:tree and capsule for this. It looks like the maven dependency plugin asks maven for the DependencyGraphBuilder component, which is implemented by Maven31DependencyGraphBuilder which just calls out to Aether, which is what capsule is doing too.
Do you see anything in here that is different from what capsule is doing to build the dependency graph? When I'm running my dependency:tree test I'm not doing it in the context of a reactor build, I see the POMs being fetched from my repo just the same as capsule does, so I'm assuming that all the reactor related code isn't in play:
https://maven.apache.org/shared/maven-dependency-tree/xref/org/apache/maven/shared/dependency/graph/internal/Maven31DependencyGraphBuilder.html
Maybe there's a difference due to management in the project's pom or parent (as you're using the manifest)? I can backport TransitiveDependencyManager from the new Aether (Maven Resolver) master -- this is really easy -- but perhaps you should try with an embedded pom first, just to make sure we're not testing several things at once.
Switching back to the embedded pom.xml with no Dependencies: in the manifest, -Dcapsule.tree output is now as expected, but if I try to launch the project I get yelled at for having removed that Dependencies: attribute:
CAPSULE: Jar: /Users/adam/IdeaProjects/acuity-platform/services/services-dist/target/services-dist-0.13.0.3-SNAPSHOT-capsule.jar
CAPSULE: Platform: macos
CAPSULE: Loading caplet: MavenCapsule
CAPSULE: Applying caplet MavenCapsule
CAPSULE: Initializing app ID
CAPSULE: Initialized app ID: com.acuitysds.services.services-dist_0.13.0.3-SNAPSHOT
CAPSULE: Launching app com.acuitysds.services.services-dist_0.13.0.3-SNAPSHOT
CAPSULE: Cleanup
CAPSULE EXCEPTION: Exception while getting attribute Dependencies while processing attribute Capsule-Agent: false
java.lang.RuntimeException: Exception while getting attribute Dependencies
at Capsule.getAttribute(Capsule.java:2798)
at Capsule.lookupAllDependencies(Capsule.java:2308)
at Capsule.prepareForLaunch(Capsule.java:1398)
at Capsule.launch(Capsule.java:1328)
at Capsule.main0(Capsule.java:407)
at Capsule.main(Capsule.java:380)
Caused by: java.lang.RuntimeException: Exception while getting attribute Dependencies
at Capsule.getAttributeNoLookup(Capsule.java:2817)
at Capsule.getAttribute(Capsule.java:2791)
... 5 more
Caused by: java.lang.NullPointerException
at capsule.Pom.resolveVersion(Pom.java:129)
at capsule.Pom.getDependencies(Pom.java:120)
at MavenCapsule.attribute(MavenCapsule.java:177)
at Capsule.getAttributeNoLookup(Capsule.java:2813)
... 6 more
Oops, sorry about that. Can you try again (new SNAPSHOT, just now)?
Looks like (inherited) properties aren't getting resolved in the parent pom
So the <dependencyManagement> including that property-reference version string is in the services parent, and the value of the property is defined in the parent of that.
CAPSULE: Downloading artifact io.dropwizard:dropwizard-logging:pom:${dropwizard.version}
CAPSULE: Transfer failed: capsule.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.dropwizard:dropwizard-logging:pom:${dropwizard.version} in acuity-public (http://ci.dev.acuitysds.com:8081/nexus/content/groups/public) (for stack trace, run with -Dcapsule.log=verbose)
CAPSULE: Downloading artifact io.dropwizard:dropwizard-logging:pom:${dropwizard.version}
CAPSULE: Transfer failed: capsule.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.dropwizard:dropwizard-logging:pom:${dropwizard.version} in acuity-private (http://ci.dev.acuitysds.com:8081/nexus/content/groups/acuity) (for stack trace, run with -Dcapsule.log=verbose)
CAPSULE: Missing artifact descriptor for io.dropwizard:dropwizard-logging:jar:${dropwizard.version}
CAPSULE: Downloading artifact org.slf4j:jul-to-slf4j:jar:1.7.7
CAPSULE: Downloading artifact org.slf4j:log4j-over-slf4j:jar:1.7.7
CAPSULE: Downloading artifact io.dropwizard:dropwizard-logging:jar:${dropwizard.version}
CAPSULE: Transfer failed: capsule.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.dropwizard:dropwizard-logging:jar:${dropwizard.version} in acuity-public (http://ci.dev.acuitysds.com:8081/nexus/content/groups/public) (for stack trace, run with -Dcapsule.log=verbose)
CAPSULE: Downloading artifact io.dropwizard:dropwizard-logging:jar:${dropwizard.version}
CAPSULE: Transfer failed: capsule.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.dropwizard:dropwizard-logging:jar:${dropwizard.version} in acuity-private (http://ci.dev.acuitysds.com:8081/nexus/content/groups/acuity) (for stack trace, run with -Dcapsule.log=verbose)
CAPSULE EXCEPTION: Error resolving dependencies. while processing attribute App-Class-Path: [/Users/adam/IdeaProjects/acuity-platform/services/services-dist/target/services-dist-0.13.0.3-SNAPSHOT-capsule.jar, Application=null=services-dist-0.13.0.3-SNAPSHOT.jar, [services-dist-0.13.0.3-SNAPSHOT.jar], com.acuitysds.services:services-auth:jar:0.13.0.3-SNAPSHOT (runtime), com.acuitysds.services:services-session:jar:0.13.0.3-SNAPSHOT (runtime), com.acuitysds.services:services-ops:jar:0.13.0.3-SNAPSHOT (runtime), com.acuitysds.services:services-admin:jar:0.13.0.3-SNAPSHOT (runtime), com.acuitysds.services:services-admin-ui:jar:0.13.0.3-SNAPSHOT (runtime), commons-codec:commons-codec:jar:1.9 (runtime), com.jamierf.dropwizard:dropwizard-logging-loggly:jar:0.7 (runtime), io.dropwizard:dropwizard-logging:jar:${dropwizard.version} (runtime)] (for stack trace, run with -Dcapsule.log=verbose)
Ah, of course. I'll take care of that.
Can you try now?
(I'm sorry, I don't use Maven and I only have a simple test pom, rather than one with parents etc. If you could contribute an interesting pom for tests, that would be very helpful)
Hmm, this is strange, -Dcapsule.tree is showing commons-beanutils:commons-beanutils:1.9.3 as expected (and the version is consistent at both points where that dependency appears in the tree) however the runtime classpath logged in verbose is using .capsule/deps/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
I'd be happy to contribute some non-trivial example project structures, but not sure if I have time right now to do a full blown test harness asserting things around that. As someone who does use maven I can say that you might be chasing after these idiosyncrasies forever and it would be beneficial to figure out how to leverage the same code maven uses to do all this dependency chasing and pom processing. In theory I guess the aether project was meant to do that even if it isn't born out in practice. Maybe that move to Apache you mentioned will be good for that project as the resolver component of record.
Well, if you don't mind being the tester, then I don't mind, either :) Can you try again?
The only places where I need to manually mimic Maven is in the embedded pom handling. The problems with Aether so far is simply that it's not very well documented, and I wasn't using it correctly. E.g., now I noticed that I set the managed dependencies in Aether only in some queries but not others; basic sloppiness, really.
Hi, sorry for the delay, I'm just now getting back to this. Using capsule-maven-1.0.4-20161223.215258-23.jar I'm still seeing the discrepancy between the -Dcapsule.tree and the actual runtime classpath used when launching the jar. Did that last commit make it into a snapshot?
If the properties are resolved correctly, then yes (you're using the POM with the parents, right?), but to make sure, I'm uploading again.
What I can try doing (it'll take a second), is backport the Aether fix from Maven 3.4. I'm a bit hesitant because I think Maven doesn't have this fix, and the bug is in Maven, too. My guess is that the reason for the discrepancy has to do with your project's POM configuration, where in your project you set some versions somewhere, and that information doesn't make it to the capsule, probably due to the parent pom support being so young. So I'd rather you find out how that particular version is determined in Maven, if possible.
I think your hesitation is justified, seeing as that bug doesn't seem to be affecting my regular maven dependency resolution, and it also isn't affecting the dependency tree which capsule generates from the exact same artifacts.
Does the recursive resolution done for the capsule dependency tree differ from what is done to generate the runtime classpath? What is interesting is that when logging verbose in the -Dcapsule.tree case I see only:
CAPSULE: Resolving artifact commons-beanutils:commons-beanutils:pom:1.9.3
However when I try to actually run the app, it does something different:
CAPSULE: Resolving artifact commons-beanutils:commons-beanutils:pom:1.9.2
followed by
CAPSULE: Resolving artifact commons-beanutils:commons-beanutils:pom:1.7.0
Hmm, maybe. What is the value of the Application attribute when you introspect? Do you have any dependencies listed in the manifest or only the pom? Does the Dependencies attribute when you introspect seem correct?
The manifest dependencies are just the "top level" ones and look correct, here are some introspection excerpts:
Application (The Maven coordinates of the application's main JAR or the path of the main JAR within the capsule):
com.acuitysds.services:services-dist:0.13.0.3-SNAPSHOT
Dependencies (A list of Maven dependencies given as groupId:artifactId:version[(excludeGroupId:excludeArtifactId,...)]):
[com.acuitysds.services:services-auth:0.13.0.3-SNAPSHOT, com.acuitysds.services:services-session:0.13.0.3-SNAPSHOT, com.acuitysds.services:services-ops:0.13.0.3-SNAPSHOT, com.acuitysds.services:services-admin:0.13.0.3-SNAPSHOT, com.acuitysds.services:services-admin-ui:0.13.0.3-SNAPSHOT, commons-codec:commons-codec:1.9, com.jamierf.dropwizard:dropwizard-logging-loggly:0.7, io.dropwizard:dropwizard-logging:0.9.1]
and somewhat encouragingly, introspect also seems to see that the beanutils versions is being managed (and lists the correct version):
Managed-Dependencies (A list of managed dependencies, forcing versions in transitive dependencies, each formatted as group:artifact:type:classifier:version):
[com.acuitysds.di:data-integration-sales:jar::0.13.0.3-SNAPSHOT, com.acuitysds:common-datomic:jar::0.13.0.3-SNAPSHOT, org.slf4j:slf4j-log4j12:jar::1.7.5, com.datomic:datomic-pro:jar::0.9.5544, io.dropwizard:dropwizard-client:jar::0.9.1, com.acuitysds.services:services-auth:jar::0.13.0.3-SNAPSHOT, org.clojure:clojure:jar::1.8.0, org.easytesting:fest-assert-core:jar::2.0M10, com.fasterxml.jackson.core:jackson-annotations:jar::2.6.1, com.acuitysds.model:data-model-common:jar::0.13.0.3-SNAPSHOT, commons-beanutils:commons-beanutils:jar::1.9.3, org.jetbrains:annotations-java5:jar::15.0, com.acuitysds.model:data-model-sales:jar::0.13.0.3-SNAPSHOT, com.google.inject.extensions:guice-servlet:jar::4.0, com.google.guava:guava:jar::20.0, com.fasterxml.jackson.core:jackson-core:jar::2.6.1, com.acuitysds.ae:ae-core:jar::0.13.0.3-SNAPSHOT, com.google.inject:guice:jar::4.0, com.acuitysds.di:data-integration-tests:jar::0.13.0.3-SNAPSHOT, org.easytesting:fest-assert:jar::1.4, io.dropwizard:dropwizard-assets:jar::0.9.1, io.dropwizard:dropwizard-logging:jar::0.9.1, com.acuitysds:common-test:jar::0.13.0.3-SNAPSHOT, com.acuitysds.model:data-model-config:jar::0.13.0.3-SNAPSHOT, ch.qos.logback:logback-core:jar::1.0.13, io.dropwizard:dropwizard-testing:jar::0.9.1, com.acuitysds:common-sfdc:jar::0.13.0.3-SNAPSHOT, org.slf4j:slf4j-simple:jar::1.7.5, com.acuitysds.ae:ae-tests:jar::0.13.0.3-SNAPSHOT, com.acuitysds:common-guice:jar::0.13.0.3-SNAPSHOT, com.acuitysds.di:data-integration-sfdc:jar::0.13.0.3-SNAPSHOT, com.amazonaws:aws-java-sdk-bom:pom::1.10.75, com.acuitysds:data-integration-tools:jar::0.13.0.3-SNAPSHOT, com.acuitysds.services:services-admin-ui:jar::0.13.0.3-SNAPSHOT, joda-time:joda-time:jar::2.9.2, com.acuitysds.services:services-session:jar::0.13.0.3-SNAPSHOT, com.acuitysds:common-aws:jar::0.13.0.3-SNAPSHOT, io.dropwizard:dropwizard-db:jar::0.9.1, io.dropwizard:dropwizard-auth:jar::0.9.1, com.acuitysds.services:services-ops:jar::0.13.0.3-SNAPSHOT, io.dropwizard:dropwizard-jackson:jar::0.9.1, com.acuitysds.model:data-model-ml:jar::0.13.0.3-SNAPSHOT, com.acuitysds.model:data-model-message:jar::0.13.0.3-SNAPSHOT, com.acuitysds.di:data-integration-core:jar::0.13.0.3-SNAPSHOT, org.apache.httpcomponents:httpcore:jar::4.4.3, com.acuitysds.services:services-admin:jar::0.13.0.3-SNAPSHOT, com.google.inject.extensions:guice-multibindings:jar::4.0, org.apache.httpcomponents:httpclient:jar::4.5.1, org.slf4j:slf4j-api:jar::1.7.5, javax.ws.rs:javax.ws.rs-api:jar::2.0.1, io.dropwizard:dropwizard-core:jar::0.9.1, commons-codec:commons-codec:jar::1.9, com.fasterxml.jackson.core:jackson-databind:jar::2.6.1, org.slf4j:slf4j-log4j13:jar::1.7.5, com.esotericsoftware.kryo:kryo:jar::2.21, org.slf4j:jcl-over-slf4j:jar::1.7.5, com.acuitysds.services:services-common:jar::0.13.0.3-SNAPSHOT, ch.qos.logback:logback-classic:jar::1.0.13, junit:junit:jar::4.11, com.google.code.findbugs:annotations:jar::3.0.0]
Why do you have the Application attribute declared? Is that artifact (services-dist) not embedded in the capsule? Try removing that attribute.
That attribute may have been a remnant of a previous attempt, but removing it doesn't seem to make a difference.
Alright, can you try again with the new snapshot (there are new snapshots for both Capsule and capsule-maven).
If that doesn't work, I'm afraid you'll have to debug the problem yourself, in particular, the method: capsule.DependencyManager.resolveDependencies(List<Dependency> deps)