Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

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 in Java at May 10 2008, 06:23:26 PM MDT 6 Comments
Comments:

Interesting, I'll bet it was the new lockdown of plugin versions in the SuperPOM that fixed things. Are you running against any plugin snapshot repositories? See http://tinyurl.com/6mrhxw

Posted by Tim O'Brien on May 11, 2008 at 01:49 AM MDT #

I don't know what caused it, it's a pretty strange issue. I haven't changed my version of the maven-antrun-plugin in over a year and it used to work fine with 2.0.6 and 2.0.7.

Posted by Matt Raible on May 11, 2008 at 01:52 AM MDT #

In the past I had some errors with maven too, some of them just looked ridiculous. But when I upgraded from 2.0.7 to 2.0.8 those errors were gone. After that time I always check for new maven versions periodically :)

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:

  <taskdef resource="webtest_base_relaxed.taskdef">
    <!-- <classpath refid="maven.test.classpath"/> -->
  </taskdef>

Posted by Gianni Salvagno on June 06, 2008 at 12:07 PM MDT #

I had this problem on 2.0.8 but the strange thing is that I had this setup for a while now and never had this problem until now. I've upgraded to 2.0.9 now and that solved the problem. Thanks for that. Sarwar

Posted by Sarwar Bhuiyan on October 29, 2008 at 11:53 AM MDT #

Just wanted to say thanks! had this problem with the built in maven in Mac OS (Leopard) and the problem was solved after having installed the ports variant. best regards/Johan

Posted by Johan Rylander on February 05, 2009 at 08:45 AM MST #

Post a Comment:
  • HTML Syntax: Allowed