IntelliJ: Automatically update resources

Another TRUE AUTOMATED APPROACH that works very well is :

  • Having an imported Maven project
  • Option: Build Tools > Maven > Importing > Import Maven Project Automatically to keep in sync IDE compiler options specified in POM ( for example maven-compiler-plugin options)
  • Plugin: File Watcher to watch for resources' updates
  • Option: Tools > File Watcher > Custom watches to copy updated files via mvn war:exploded ( in our case Javascript and HTML )
  • Option: Build > Compiler Build Project Automatically to update .class

In our case we deploy on Google Cloud App Engine Devserver which reloads files everytime they are updated


If you go into your Server Run Configuration, on the Server tab there is an option named "On frame deactivation". Set that to "Update resources" and then whenever IDEA loses focus, it will update the resources of the server.

Relevant docs from Intellij http://www.jetbrains.com/idea/webhelp10.5/updating-a-running-java-ee-application.html#update_on_frame_deactivation

Edit 8/19/2020 Thanks to Adi Gerber for providing an updated link, which is https://www.jetbrains.com/help/idea/2016.2/updating-applications-on-application-servers.html#update (the previous one doesn't work anymore)

And here is a link to the current docs as of 8/19/2020: https://www.jetbrains.com/help/idea/updating-applications-on-application-servers.html#update