20

Under what scenario i need to choose between jaxb-impl vs jaxb-core? having both jaxb-impl and jaxb-core in my project would cause any class loading conflicts?

Shravan Ramamurthy
  • 3,896
  • 5
  • 30
  • 44
  • See http://stackoverflow.com/questions/26413431/which-artifacts-should-i-use-for-jaxb-ri-in-my-maven-project/26413432#26413432 – lexicore Sep 28 '16 at 05:34
  • 5
    I don't see the difference between the two explained. – Abbadon Apr 11 '19 at 08:16
  • 1
    Trying to create a uber jar with Maven's shaded plugin returns: jakarta.activation-1.2.1.jar, jakarta.activation-api-1.2.1.jar define 31 overlapping classes: – user3579222 Jul 24 '19 at 13:41

1 Answers1

0

If you go by the com.sun.xml.bind artifacts in Maven Central it seems jaxb-core is a underlying (shared) dependency of jaxb-impl, jaxb-xjc and jaxb-jxc); thus you would require jaxb-core to work with jaxb-impl.

<!-- jaxb-impl -->
<!-- ... --->
    <!-- ... --->
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>

    <packaging>jar</packaging>
    <name>Old JAXB Runtime</name>
    <description>Old JAXB Runtime module. Contains sources required for runtime processing.</description>
    <url>https://eclipse-ee4j.github.io/jaxb-ri/</url>

    <dependencies>

        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
        </dependency>
    <!-- ... -->
<!-- ... --->
<!-- jaxb-core -->
<!-- ... --->
    <!-- ... -->
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-core</artifactId>

    <packaging>jar</packaging>
    <name>Old JAXB Core</name>
    <description>Old JAXB Core module. Contains sources required by XJC, JXC and Runtime modules with dependencies.</description>
    <url>https://eclipse-ee4j.github.io/jaxb-ri/</url>
    <!-- ... -->
<!-- ... -->
ciis0
  • 311
  • 1
  • 9