gradle - jetty and tomcat plugin

1. Jetty plugin

What is Jetty plugin:

extends the War plugin to add tasks which allow you to deploy your web application to a Jetty web container embedded in the build.

Limitation:

default jetty version is v6.x. If you need more recent version, you need “gretty”.

2. Gretty plugin

What is Gretty plugin:

Advanced gradle plugin for running web-apps on jetty and tomcat

How to use:

remove ‘jetty’ plugin first.
Then add the following into buildscript.

apply plugin: 'war'
apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin'

run:

gradle appRun

Now default jetty version is 9.x.
Besides, gretty also supports tomcat. Nice toy!