Configuring jettyRun to serve multiple contexthandlers?


(Tommy Svendsen) #1

I am trying to configure gradle jettyRun to achieve the same as in our maven plugin here: https://gist.github.com/tsvendsen/5063545

I have tried several ways to get this working, but none of them suceeded. I tried creating ContextHandlers using groovy in the gradle build script. They where registered by the server and I was able to get jetty running, but all requests still went to the default context provided by the jettyRun plugin

Then I tried configuring this in jetty-config.xml and added

jettyRun {
   contextPath="/"
   jettyConfig = file("src/jetty/jetty-config.xml")
}

Again I could see that jetty was picking up my handlers, but still the request went to src/main/webapp no matter which url I used

Any Idea on how to achieve the same result as in my gist here with the jettyRun plugin in gradle?