2

Background

Disclaimer: I have very little experience with Java.

We previously used a wrapped version of Jetty 6 for on-demand static content (JS, CSS, images, HTML) during our Ant build so we can run unit tests with PhantomJS against an HTTP-hosted environment.

However, Jetty is now on version 8.1.3 and we no longer need that wrapping (which solves a different problem which is now moot), so I wanted to update to just using Jetty 8.1.3 directly.

First I downloaded the whole Jetty distribution, which weighs in at a massive ~40 MB. This works from Ant, using "start.jar"... but I don't really want to be pushing those unnecessary JARs around everywhere.

So then I downloaded the aggregate "jetty-server-8.1.3.v20120416.jar" (latest) from the Maven repo, BUT I can't seem to use that JAR from Ant like I could with "start.jar", e.g. "java -jar jetty-server-8.1.3.v20120416.jar OPTIONS=Server"

The Jetty documentation is both poor and missing (404's). Ugh!

Actual Question

So, if I go back to using the full distribution of Jetty with "start.jar" instead of the aggregate "jetty-server", what is the minimum set of files (JARs and configs) from the full Jetty distribution that I need to server basic static content over HTTP?

...

Related Question: How to start an aggregate jetty-server JAR from Ant?

Community
  • 1
  • 1
James M. Greene
  • 1,251
  • 1
  • 16
  • 23
  • P.S. This is **not** a duplicate of the related question [How to start an aggregate jetty-server JAR from Ant?](http://stackoverflow.com/questions/10555868/how-to-start-an-aggregate-jetty-server-jar-from-ant). The actual questions are **different**, they just have the same background information. – James M. Greene May 11 '12 at 19:49

1 Answers1

1

http://wiki.eclipse.org/Jetty/Howto/Use_Jetty_with_Ant

if you don't need things like jetty-jmx or jetty-jndi then just trim those

jesse mcconnell
  • 7,102
  • 1
  • 22
  • 33
  • I know that there is a Jetty Ant task but your answer doesn't help me figure out what my minimum set of required JARs, configs, etc. is. – James M. Greene May 14 '12 at 13:56
  • that is because that is different for different uses, get it working with what is there and start trimming out what you don't need. don't need webapps, then remove jetty-webapp, don't need servlets, remove jetty-servlets, don't need websockets then remove jetty-websockets – jesse mcconnell May 14 '12 at 14:00
  • 1
    but if you don't want to work backwards, start with jetty-util, jetty-io, jetty-http, jetty-server, and probably the servlet-api – jesse mcconnell May 14 '12 at 14:02
  • Are there descriptions available of what each one of these packages/JARs does to help me figure out what I need? – James M. Greene May 15 '12 at 14:33