Apparently there's this servlet implementation called Winstone, which is pretty handy for the embedded use. The whole implementation is in a single jar. So the "3 minute set up of Hudson" that Tim talks about consists of the following 5 steps:
Then run java -jar winstone-0.9.6.jar --warfile=hudson.war --httpPort=8081
You should see something like the screenshot below.
But then I thought, since a war file and a jar file are of the same format, wouldn't it be nice if I put a little bootstrap code in hudson.war, so that you can just execute it likejava -jar hudson.war?
hudson.war is already a little more than 10MB, so I could easily afford to put winstone.jar in it, which is around 320KB. When you run java -jar hudson.war, a littleMain.class in it will take the control, and it useswinstone.jar inside hudson.war to launch itself.
Of course it's still a war file, so you could still just drophudson.war in any existing web container, and that works, too. With that, the new "2 minute setup" of Hudson becomes the following: