Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Maven 2 XOM dependencies

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Adam Constabaris <adamc AT unc.edu>
  • To: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] Maven 2 XOM dependencies
  • Date: Tue, 13 Dec 2005 16:20:30 -0500

This isn't about XOM as such, since it's about Maven 2's dependency resolution mechanism; the short version is that the POM in the ibiblio respository for XOM 1.1 references jaxen, although a jaxen JAR on the classpath is neither a compile-time nor a runtime dependency for XOM.

Having the dependency specified unfortunately leads to all sorts of extra jars being pulled into your dependency tree [ one of which is JDOM, forcing you to be very careful about which packages you let an IDE auto-import for you =) ] The tree can be managed somewhat via m2's exclusions mechanism, but if one is available, I'd prefer a solution at the level of the repository.

If there's a global fix to be had, it might be as simple as adding a <scope>provided</scope> element for the jaxen dependency, but I don't know enough about M2's facilities for these things to figure out whether that does what I think it ought to do. Another possibility is removing the dependency referenced in the POM entirely, since the jaxen classes are bundled in the XOM jar in the repository.

AC




Archive powered by MHonArc 2.6.24.

Top of Page