[ http://jira.codehaus.org/browse/MNG-2420?page=all ]
John Casey updated MNG-2420:
----------------------------
Fix Version: 2.1
> exclusion on dependency seems to act global on POM
> --------------------------------------------------
>
> Key: MNG-2420
> URL: http://jira.codehaus.org/browse/MNG-2420
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Environment: tested on solaris, linux and windows
> Reporter: Jörg Hohwiller
> Fix For: 2.1
>
>
> In my POM I added "xerces:xercesImpl:2.8.0" as compile dependency what
> depends on "xml-apis:xml-apis:1.3.03".
> Since I also have "commons-betwixt:commons-betwixt:0.7",
> "commons-configuration:commons-configuration:1.2", and "ant:ant:1.6.5" as
> dependencies that also depend on "xml-apis" but in different versions I came
> into trouble.
> Since one of theses "xml-apis" dependencies has a higher version number (but
> is the JAR of an earlier version) maven does not decide for "1.3.03" which is
> correct behaviour for maven. Anyways I got
> NoClassDefFoundError: org/w3c/dom/DOMError
> when I run my tests with XmlUnit.
> Now here comes the problem:
> I added the following XML snipplet to all dependencies that depend on
> xml-apis except for xercesImpl.
> <exclusion>
> <artifactId>xml-apis</artifactId>
> <groupId>xml-apis</groupId>
> </exclusion>
> This caused maven NOT to include the dependency on "xml-apis" at all.
> This was hard to track because the "org/w3c/dom/DOMError" did not occure on
> evey machine involved in the project.
> I figured out that the ones having no trouble used jdk1.5 that has this code
> included inside (JAXP 1.3).
> With jdk1.4.2 this bug was reproducable on any operating system.
> Now it comes even harder:
> I added
> <dependency>
> <groupId>xml-apis</groupId>
> <artifactId>xml-apis</artifactId>
> <version>1.3.03</version>
> </dependency>
> as toplevel dependency to the POM and still maven did NOT include this
> dependency when running the test.
> The funny thing is that "mvn eclipse:eclipse" produced the right dependency
> in my IDE.
> Anyways in the dependency report on the site it was missing.
> I additionally had to remove all the exclusion tags to make it work again.
> To me it looks like the handling of the <exclusion> tag is broken,
> meaning that it does NOT work as I (!) expected.
> I hope that this behaviour is NOT intendet.
> Best Regards Jörg
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira