Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Ant Jetty plugin how-to not working for me

On 11/17/2010 07:38 AM, Chris Dolan wrote:
Using this:

build.xml

ant command output:
https://gist.github.com/702793

I've followed all the instructions in the document above (making allowances for version differences), but can't get the example working.  As you can see, I have the jetty-util jar in the classpath, but at taskdef time, Ant cannot find a class file (which I've confirmed is definitely in jetty-util.

Can anyone help?

ant tends to use a set of core utilities to build the CLASSPATH used to find its various dependencies.  If those utilities cannot find the .jar file containing the ant plugin, it won't be included on the CLASSPATH and you'll get the error you experienced.  Try debugging the /usr/bin/ant script, specifically the OPT_JAR_LIST .. for me, line 182 contains a line that calls /usr/bin/build-classpath passing $OPT_JAR_LIST and resulting in the classpath for all those jars.

I had to pull similar tricks to get the jsch stuff (for scp support in ant scripts) working, which I think boiled down to putting both the .jar file, and a soft link to it, in /usr/share/java.

Nick

Back to the top