Copying some generic infrastructure from modlog. Derby and Jetty appears to be working already, yay.