Having Problems apply rewrite rules for jetty

I’m having some problems attempting to apply some rewrite rules from a ‘jetty.xml’ file. Here’s what I got (pertaining to jetty – the war setup and everything is going fine):

‘’’ jettyRunWar.contextPath ‘’ jettyRunWar.jettyConfig = file(‘jetty.xml’) jettyRunWar {

additionalRuntimeJars = [file(‘jetty.xml’)] } ‘’’

And from ‘jetty.xml’ (which is in the root of that project): https://gist.github.com/kfreisen/ca5e1974fe37448ba7e0

I’m getting this exception:

‘’’ Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Server

at org.mortbay.util.Loader.loadClass(Loader.java:91)

at org.mortbay.xml.XmlConfiguration.nodeClass(XmlConfiguration.java:224)

at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:187)

at org.gradle.api.plugins.jetty.JettyRunWar.applyJettyXml(JettyRunWar.java:121)

at org.gradle.api.plugins.jetty.AbstractJettyRunTask.startJettyInternal(AbstractJettyRunTask.java:201)

… 54 more ‘’’

I tried adding ‘‘org.eclipse.jetty:jetty-server:9.3.0.M0’’ as a runtime dependency, but that also did not seem to do anything. Any ideas?

The Gradle core Jetty plugin doesn’t allow for changing the version of Jetty that it comes with. You might want to use the Gretty plugin instead. It’s far more configurable and allows for changing the Jetty version.