Dealing with "Xerces Hell" in Java/Maven?
Xerces, a widely used XML parser, has long been a source of frustration for Java developers due to its history of unversioned JARs, lack of official Maven releases, and split jars (xml-apis and xercesImpl). This has led to version conflicts and classloader issues.
Problems:
Solutions:
While marking Xerces dependencies as
Maven Central Resolution:
In February 2013, JARs for Xerces 2.11.0 and its source JARs were released on Maven Central. This eliminates the need for custom builds and simplifies dependency management.
To use the Maven Central version:
<dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.11.0</version> </dependency>
Future Improvements:
The Apache Xerces team has uploaded patched build scripts that allow for automated Maven Central upload, addressing the root cause of the "Xerces hell." This improvement should resolve the issues permanently.
The above is the detailed content of How to Escape \'Xerces Hell\' in Java/Maven?. For more information, please follow other related articles on the PHP Chinese website!