By Default, when the same dependency is found in the dependency tree, Maven uses a closest one to the root.
In your case, this means
org.hibernate:hibernate-entitymanager:jar:4.3.1.Final:compile
\- dom4j:dom4j:jar:1.6.1:compile
\- xml-apis:xml-apis:jar:1.0.b2:compile
Vs
org.codehaus.groovy.modules.http-builder:http-builder:jar:0.5.1:compile
\- net.sourceforge.nekohtml:nekohtml:jar:1.9.9:compile
\- xerces:xercesImpl:jar:2.8.1:compile
\- xml-apis:xml-apis:jar:1.3.03:compile
Or to put it another way 3 levels deep vs 4 levels deep so 1.0.b2
wins.
To solve this, either exclude xml-apis
from your dependency on hibernate-entitymanager
or explicity declare a dependency on xml-apis
(though you might have to play with this a bit, Xerces and its dependencies can be a nightmare to get aligned version-wise).