I am working on improving the pom-scijava bill of materials to eliminate duplicate class conflicts between managed artifacts. I discovered that formats-bsd depends on an artifact
ome:jxrlib-all, but I cannot find the code for this artifact anywhere. It’s a problem because it ships
com.sun.xml.bind classes, which conflicts with
javax.xml.bind:jaxb-api (in the case of
javax.xml.bind) as well as
org.glassfish.jaxb:jaxb-runtime (in the case of
com.sun.xml.bind). It has other unshaded classes too: the
com.sun.istack package which clashes with
com.sun.xml.txw2 which clashes with
What would you recommend to resolve this? I am guessing there should only be one implementation on the classpath for each of
com.sun.xml.bind, no? In which case, it is similar to the situation with SLF4J, where libraries should not transitively impose a preference, right?
For now, I added
javax.xml.bind to the list of allowed-to-be-duplicated class prefixes to ignore the problem, but I just wanted to give a heads up because this may cause unexpected behavior in downstream consumers when multiple sources of these classes are on the classpath.