Details
-
Type: Improvement
-
Status: Closed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 1.4.2
-
Fix Version/s: 1.4.2
-
Component/s: None
-
Labels:None
Description
This maven plugin shows duplicate classes:
http://mojo.codehaus.org/extra-enforcer-rules/banDuplicateClasses.html
It reveals that XStream is depending on 2 artifacts which have duplicate classes packaged in them. You'll get a different version depending on which jar happens to be first on your classpath.
Found in:
xmlpull:xmlpull:jar:1.1.3.1:runtime
xpp3:xpp3_min:jar:1.1.4c:runtime
Duplicate classes:
org/xmlpull/v1/XmlPullParserException.class
org/xmlpull/v1/XmlPullParser.class
Is it possible to reconfigure the dependency tree so that this overlap does not occur?
No. Unfortunately the xpp3_min jar contains only half of the required stuff of the official xmlpull API. Without the xmlpull jar the instantiation of the XppDriver (actually the XppReader) will fail, because the XmlPullParserFactory is missing.
It would be nice to get an xpp3_min jar that either contains nothing of xmlpull or all of it. However, as long as this is not available, nothing can be done.
If you use the Xpp3Driver directly, you can exclude the xmlpull dependency yourself. In that case the factory is not required.