xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Steve Loughran <steve.loughran AT gmail.com>
- Cc: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] Maven 2 XOM dependencies
- Date: Tue, 13 Dec 2005 22:56:28 +0000
On 12/13/05, Adam Constabaris <adamc AT unc.edu> wrote:
> 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.
1. be glad that the m2 repository is working at all; I had to complain
last week that they had a v3 pom in there, not a v4
2. yes, the dependencies hurt. its not jaxen, its the further down the
chain things like dom4j.
3. scope isnt running in the ant tasks, so that isnt a solution for
me. Indeed, the underlying problem is that the dependencies used at
build time should only be a hint as what to deploy with downstream,
nothing but a hint.
4. Patch your .pom to exclude stuff
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>${jdom.version}</version>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
</exclusion>
</exclusions>
</dependency>
I'm not convinced that transitive dependencies work. right now the m2
repository is a mess, and there is no automated check that all the
dependencies are resolvable. More importantly, there is not enough
evidence that the people who 'own' the poms, the individual projects
care.
-steve
-
[XOM-interest] Maven 2 XOM dependencies,
Adam Constabaris, 12/13/2005
- Re: [XOM-interest] Maven 2 XOM dependencies, Steve Loughran, 12/13/2005
-
[XOM-interest] Error output stream,
peter murray-rust, 12/14/2005
-
Re: [XOM-interest] Error output stream,
Elliotte Rusty Harold, 12/15/2005
- Re: [XOM-interest] Error output stream, Michael Kay, 12/16/2005
- Re: [XOM-interest] Error output stream, peter murray-rust, 12/16/2005
-
Re: [XOM-interest] Error output stream,
Elliotte Rusty Harold, 12/15/2005
-
Re: [XOM-interest] Maven 2 XOM dependencies,
Elliotte Harold, 12/19/2005
- Re: [XOM-interest] Maven 2 XOM dependencies, Adam Constabaris, 12/19/2005
Archive powered by MHonArc 2.6.24.