Hudson became self-executable
Hudson has always been distributed as a single war file, and the installation was as easy as dropping this war to your web container. I thought this was easy enough, but then people pointed out that installing a web container is not all that easy. There has been some discussion about this in the users list, and usual options like bundling Jetty was mentioned, but none of them seemed quite right.
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:
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 like java -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 little Main.class in it will take the control, and it uses winstone.jar inside hudson.war to launch itself.
Of course it's still a war file, so you could still just drop hudson.war in any existing web container, and that works, too. With that, the new "2 minute setup" of Hudson becomes the following:
- Download the Hudson war file from its Java.net Release page
- Then run
java -jar hudson.war
- You should see something like the screenshot below.
... except that as of this writing, this new change is still not released yet. So this will work starting upcoming 1.81.
Really, the installation can't get any easier than that.