Build scripts that need fine-grained control over Jetty can assign the webAppConfig property in AbstractJettyRunTask. However, when this is done, AbstractJettyRunTask.configureWebApplication() will no longer use the task properties contextPath, tmpDirectory, webDefaultXml and overrideWebXml to configure the context, forcing build scripts to duplicate this code.
A better solution would be to always use those properties, regardless of whether the webAppConfig was created by the build script or not.
Build scripts could still retain full configurability of the web app by omitting the above-mentioned configuration properties.
Attaching suggested but untested patch.
|