Issues with AntRun Plugin and Maven
I started seeing the following error today when using Maven and the AntRun Plugin.
[INFO] [antrun:run {execution: default}] [INFO] Executing tasks [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error executing ant tasks Embedded error: java.lang.IllegalAccessError: tried to access method org.apache.tools.ant.launch.Locator.decodeUri(Ljava/lang/String;)Ljava/lang/String; from class org.apache.tools.ant.AntClassLoader
Searching the internet provided no results, so I was pretty stumped - especially since this error didn't happen on my MacBook Pro. It happened on AppFuse's Bamboo server (Linux), but not locally. Luckily, I was able to reproduce it on my Windows box and discovered the solution: upgrade to a newer version of Maven. I was using 2.0.6/2.0.7 and upgrading to 2.0.9 fixed the problem.
BTW, when is the Ant project going to release a new version of Ant? The current 1.7.0 version doesn't support spaces in path names, which seems like a pretty big issue to me (especially for Windows users).
Posted by Tim O'Brien on May 11, 2008 at 01:49 AM MDT #
Posted by Matt Raible on May 11, 2008 at 01:52 AM MDT #
Posted by Eduardo Burgos on May 16, 2008 at 02:14 PM MDT #
I had the same problem running the integration-test of the Appfuse web module with the Maven plugin for Eclipse 3.3.1.1 (m2eclipse). The Eclipse plugin uses the 2.1-Snapshot version of Maven. It seems to be a issue due to the different releases of Ant used by Eclipse 3.3 ( including Ant 1.7 as plugin ) and Appfuse ( using Ant 1.6.5 ).
Commenting out the classpath refid of the taskdef fixed the problem:
Posted by Gianni Salvagno on June 06, 2008 at 12:07 PM MDT #
Posted by Sarwar Bhuiyan on October 29, 2008 at 11:53 AM MDT #
Posted by Johan Rylander on February 05, 2009 at 08:45 AM MST #