Search code examples
eclipsetomcatgradlestatic-fileshotdeploy

Gradle Tomcat plugin - static resources hot deploy


I've read that Gradle Tomcat Plugin supports hot code deployment.

What about static resources such as CSS, JS and HTML files? Is it possible to have the plugin to "monitor" the static files for changes and re-deploy them? At the moment I'm forced to restart tomcat through Ctrl + C + gradle tomcatRunWar to see the changes in the browser.

If hot deployment for static resources is not available/possible, where is the plugin keeping a copy of them? As a workaround I'm thinking of using rsync.

Thanks


Solution

  • It's generally recommended to use the Gretty rather than Gradle's built-in Jetty or Tomcat plugins. Gretty has support for hot-deployment of web resources as well as serving static resources strait from your workspace.