Field f = WebAppController.class.getDeclaredField("context");
f.setAccessible(true);
f.set(controller,hudson.servletContext);
}
try {
controller.setInstallStrategy(new DefaultInstallStrategy());
} catch (IllegalStateException e) {
// strategy already set ignore
}
controller.install(hudson);