[ 
http://jira.codehaus.org/browse/MNG-3181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106903
 ] 

Jason van Zyl commented on MNG-3181:
------------------------------------

There are two problems.

1) The JDOM in the root loader causes the release plugin grief
2) The JDOM pulled in by the webdav extension causes the release plugin grief

The problem is that JDOM uses Class.forName (bad) and it's in the root loader 
and trying to grab something from Jaxen which is in the release plugin loader 
which causes things to blow. I have no idea how this is working. Things might 
all be getting jammed in the same classloader, but JDOM and Jaxen are 
definitely in different classloaders in 2.1 and we get the following.

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/jaxen/JaxenException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.jdom.xpath.XPath.newInstance(XPath.java:126)

I have removed JDOM from the core and put the JDOM stuff required for the 
embedder in a maven-embedder-extras package and this makes more sense as it is 
an extra and prevents the core from being polluted. But the webdav extension is 
a problem, currently being loaded in the root loader makes it not work. My 
theory is that the extension manager was not blocking the loading of artifacts 
by adding extension artifacts to the filter manager and the classloader was 
loading child first. We tried to be more standard with later versions of 
classworlds but i think we need to load child first and let duplicate artifacts 
find their way into plugin classloaders.

> JDOM artifact filtering is causing problems
> -------------------------------------------
>
>                 Key: MNG-3181
>                 URL: http://jira.codehaus.org/browse/MNG-3181
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Jason van Zyl
>            Assignee: Jason van Zyl
>             Fix For: 2.1-alpha-1
>
>
> For example in the release plug that requires JDOM which uses Jaxen. We are 
> cutting off resolution of Jaxen so the release plugin fails. Anything that 
> requires Jaxen via JDOM will fail.

-- 
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

        

Reply via email to