Following the instructions (http://docs.codehaus.org/display/JETTY/Ant+Jetty+Plugin), I've made jetty launch from my ant build file. I run ant from the command-line, and I see several issues with the jetty/ant integration, although I may well be missing fixes for them:
1.) The Ant build does not fail if the Jetty server does not launch correctly
I've seen this if there already is a jetty server listening at the specified port. In this case, the jetty task returns but the ant build ends successfully.
2.) The jetty server instance is not terminated when the plugin task returns to ant. This causes jetty's termination trace to be mingled with ant's termination trace, which hides ant's termination status. The trace below shows this:
[echo] JETTY START-UP FAILED!
[echo] There already be a Jetty running on the port!
[echo] Check the log file!"
/home/tony/working_copy/dict11/build.xml:792: JETTY FAILED
Total time: 8 seconds
2008-11-17 14:30:38.366::INFO: Shutdown hook executing
2008-11-17 14:30:38.367:ptweb:INFO: Destroying Spring FrameworkServlet 'main'
2008-11-17 14:30:38.371:ptweb:INFO: Closing Spring root WebApplicationContext
2008-11-17 14:30:38.379:ptweb:INFO: Shutting down log4j
log4j:WARN No appenders could be found for logger (com.mchange.v2.c3p0.impl.NewPooledConnection).
log4j:WARN Please initialize the log4j system properly.
2008-11-17 14:30:38.383::INFO: Shutdown hook complete
I've attached the relevant part of my build file.