How to find out the version of Jetty

Jetty standalone

To get Jetty to print out it's version you can type:

>  java -jar start.jar --version
jetty 6.0-SNAPSHOT

Alternatively, look at the log file. The second line should be the version number in an INFO message. Like this:

:INFO:  jetty 6.0-beta14

Jetty plugin

Look at the INFO messages printed out by Jetty when the plugin starts up. After any build-related messages from Maven, you should see the following:


[INFO] Starting jetty 6.0-beta14 ...
:INFO:  jetty 6.0-beta14
. . .
[INFO] Started Jetty Server

Jetty embedded

If you want to print out the runtime version of Jetty, you can use the following code snippet:

 import org.mortbay.jetty.Server;

 Server server;
 ...
 server = new Server();
 ...
 System.err.println ("Starting jetty "+server.getClass().getPackage().getImplementationVersion()+" ...");