maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <>
Subject [jira] Commented: (MANTRUN-123) Plugin class path pollutes class path of custom tasks
Date Mon, 16 Nov 2009 11:57:55 GMT


Benjamin Bentmann commented on MANTRUN-123:

The problem here is that the Ant Tasks see the wrong classes. The Ant Tasks are fully self-contained
but when run by the AntRun Plugin, many classes get erroneously loaded from the Maven core
realm instead of the {{maven-ant-tasks.jar}}, giving rise to linkage errors like the one reported

A temporary workaround seems to be the {{reverseLoader="true"}} attribute for the {{<typedef>}}:
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"

Not sure how this can be fixed ultimately, i.e. whether the AntRun Plugin can be enhanced
to provide better class loader isolation or whether we need to workaround this in the Ant
Tasks by shading each and every class.

> Plugin class path pollutes class path of custom tasks
> -----------------------------------------------------
>                 Key: MANTRUN-123
>                 URL:
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Matt Raible
>         Attachments: err.log
> Steps to reproduce:
> svn co (user: guest, pass:
> mvn install
> Here's the build.xml file:
> [ERROR] An Ant BuildException has occured: The following error occurred while executing
this line:
> /Users/mraible/Work/appfuse/archetypes/build.xml:14: java.lang.NoSuchMethodError: org.codehaus.plexus.DefaultPlexusContainer.setClassWorld(Lorg/codehaus/classworlds/ClassWorld;)V
> -> [Help 1]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please read the
following articles:
> [ERROR] [Help 1]

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message