my app is being deployed to Jetty 7. The internal Jetty 6 has been fine for testing until now, when I need to bundle a jetty-web.xml file. The move from Jetty 6 to Jetty 7 also changes the package names so gradle cannot find the correct class.
Is there a clean way to upgrade the gradle jetty plugin to use Jetty 7?
At the moment, the Jetty version is not configurable in your build file (yet)
You’d have to fork gradle, and update the jetty versions in the build.gradle that’s in the project root.
Then build a distribution
You could use my plugin instead of the built-in plugin:
IMHO, Andreas has the best answer. I have created an example of using Gradle with Spring 4 and Servlet 3 at https://bitbucket.org/jackcholt/spring4hw. Until I configured it to use Andreas’ plugin instead of the bundled Jetty plugin, it simply didn’t work. Probably because I had used Spring 4 in such a way that it didn’t use a web.xml file. I believe getting rid of the web.xml was not supported before Servlet 3.
Thank you, Andreas!
You should also checkout the gretty plugin on github. Very nice plugin and very good maintained.