IntelliJ & Wildfly - hot deploy webapp

el n00b picture el n00b · Feb 3, 2015 · Viewed 7.2k times · Source

I am using IntelliJ (14.0.3) and Wildfly (8).

When I recompile my Java classes, hot swapping is easy and everything works just fine. However, my HTML, JS and CSS files will not hot swap for me. I am sure it is just a configuration issue and was hoping for some help.

My HTML data is in:

<root>/<war_module>/src/main/webapp

My run/debug is setup for:

Before launch: Make, Build Artifacts

  1. Make
  2. Build 'mymodule:war' artifact

Answer

Rafael R. S. Robles picture Rafael R. S. Robles · Mar 30, 2015

I had the exact same problem, this is how it worked for me:

After configuring your JBoss server (Wildfly), setup an artifact of type exploded, in my case I selected Web Application: Exploded, and then in the Output directory add .war to the end of the name.

In case you need a .ear, simply select JavaEE Application: exploded instead, but anyways always remember to add manually the extension.

After setting this artifact to work with your Application Server, in the edit configurations of your Wildfly server select the option Update resources in the list of options in the section On frame deactivation.

So every time you modify and save static content, it will update these changes as soon as you focus something else outside the IDE, like the browser.