Maven works great and solves lots of conflicting API problems for you. The one case when it can’t help and usually hurts is when APIs change groupId or artifactId. I recently had a case where I needed a CXF generated client to log the outbound and inbound soap messages. I added the following to my client spring config file.
<cxf:bus> <cxf:features> <cxf:logging/> </cxf:features> </cxf:bus>
This worked great in the small test app that I wrote. It was an epic fail when I added it to my much larger webapp.
The problem was that the Xerces api that it was finding wasn’t the same version that it thought it was calling.
After much searching, I found Xerces and xml-api Dependency Hell. This blog went into the history of the various names. The gist is that now, you use xml-apis:xml-apis for your Maven XML dependency. You may also have to exclude xerces:xmlParserAPIs and xml-apis:xmlParserAPIs.
While researching this, I ran across Using the EnvironmentCheck utility that can help diagnose XML API classpath problems.
sheltonn March 1st, 2012