I am using the latest stable version of quite standard Java libraries such as Spring, yet getting 'overlapping classes' warning from maven shade plugin about three different libraries that define the same classes.
The libraries: jakarta.activation-api
, javax.activation-api
, activation
.
Specifically:
jakarta.activation:jakarta.activation-api:jar:1.2.2
(dependency of jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3
)javax.activation:javax.activation-api:jar:1.2.0
(dependency of javax.xml.bind:jaxb-api:jar:2.3.1
, I think this one should be replaced by jakarta.xml.bind-api
, but not sure)javax.activation:activation:jar:1.1
(dependency of com.sun.mail:javax.mail:jar:1.6.2
)What library is the 'right' one that will cause the least amount of trouble?
Update: it seems that jakarta.xml.bind-api
replaces javax.xml.bind:jaxb-api
(proof: here and here), so in the conflict between (1) and (2) the jakarta one (jakarta.activation-api
) should be preferred over the javax one (javax.activation-api
). The preferred JAXB dependencies are described in Jakarta web site. But it is still unclear how is this related to javax.activation:activation
.
Finally got it.
JavaBeans activation framework has been moved to Jakarta Activation, see Jakarta JAF page, it means javax.activation:activation
is out of date.
The right one seems to be jakarta activation, thanks to this answer.
Same for emails and XML processing that require the activation JAR - use the Jakarta ones: com.sun.mail:jakarta.mail
and jakarta.xml.bind:jakarta.xml.bind-api
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With