Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.3
-
Fix Version/s: None
-
Labels:None
-
Environment:Maven 3.0-alpha-3
-
Number of attachments :
Description
Steps to reproduce:
svn co https://appfuse.dev.java.net/svn/appfuse/trunk/archetypes (user: guest, pass: <blank>)
mvn install
Here's the build.xml file:
http://source.appfuse.org/browse/appfuse/trunk/archetypes/build.xml?r=HEAD
[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] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Issue Links
- relates to
-
MANTTASKS-165
Ant tasks in antrun plugin - IT failing with Maven 3
-
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 here.
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" reverseLoader="true">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.