Dependency resolution for org.apache.cxf:cxf-api:2.6.10 seems wrong

The dependency tree for cxf-api seems wrong. Maven and Gradle disagree about the version of jaxb-impl required


+--- org.apache.cxf:cxf-rt-core:2.6.10
+--- com.sun.xml.bind:jaxb-impl:2.1.13


+- org.apache.cxf:cxf-rt-core:jar:2.6.10:compile
+- com.sun.xml.bind:jaxb-impl:jar:

I’m not sure how Gradle resolves its dependencies, but the pom.xml in Maven central references cxf-parent for depencencyManagement which contains the following lines:


And also:

 by default, we use jaxb 2.1, but java5 profile will override to 2.2

There are profiles are enabled with the 1.5 and 1.7 JDK that should use later versions of jaxb-impl. Not sure if this is a problem in the way Gradle resolves dependencies, but it seems that it should I believe the correct version of jaxb-impl is as Maven reports when I’m compiling with 1.7.

I think gradle has taken the stance that profiles in a published artifact are a bad idea and are not supported. Recently, a fix went in to gradle 1.12 to support the default profile ie:



Related discussion

Even the Maven community takes that stance. It’s impossible for us to support all possible forms of “dynamic” published POMs, but we are trying to address the basic/common cases.