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 ofjakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3
)javax.activation:javax.activation-api:jar:1.2.0
(dependency ofjavax.xml.bind:jaxb-api:jar:2.3.1
, I think this one should be replaced byjakarta.xml.bind-api
, but not sure)javax.activation:activation:jar:1.1
(dependency ofcom.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
.