Dealing with "Xerces Hell" in Java/Maven

Maven artifact not found in central

There are other ways for an author to host their jars in their public website. But I'm not sure why dependency resolving error occurs in this repo, when I figure out I'll edit this answer to include it.
Until then You can download the jar from files section of the repository page and include it in your class path to solve this issue for now.

here's the link to file

Xerces dependency and JRE

The preferred solution seems to be to only use the Java APIs, so I removed org.apache.xml.serialize.OutputFormat and used the following for formatting:

final TransformerFactory tf = TransformerFactory.newInstance();
final Transformer transformer = tf.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");

Now I no longer need the Xerces dependency at all.



Related Topics



Leave a reply



Submit