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 11:56 PM, Chris Dolan wrote:
It turned out that the real problem was that I'd dropped the jetty-ant JAR file into my $ANT_HOME/lib and forgotten about it.  I found a similar Q&A on StackOverflow (http://stackoverflow.com/questions/482303/ant-cannot-find-a-class-needed-by-an-externally-defined-taskdef) that mentioned, "if the task class can be loaded by a classloader higher up in the classloader heirarchy... then your classpathref will simply get ignored".  That's exactly what happened in my case.  I removed the JAR from $ANT_HOME/lib, and now Jetty is running fine.

Ah I see, my mistake, the Jetty <taskdef> provided its own 'hardcoded' classpath of jetty-lib/*.jar.  Well done for noticing the $ANT_HOME/lib problem.

Funny, I couldn't get jsch working by putting it in $ANT_HOME/lib.. I experimented just now, and I really have to have a soft link /usr/share/java/ant/ant-jsch.jar pointing to ant-jsch-1.7.1.jar in the same directory for ant to pick it up naturally via its build-classpath logic.

Nick

Back to the top