7

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
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
el n00b
  • 1,957
  • 7
  • 37
  • 64

1 Answers1

11

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.

  • I was missing that last part: "Update Resources on Frame Deactivation". Thanks – el n00b Mar 31 '15 at 15:02
  • I was missing the 'add the extension manually' part, which basically solved every problem I ever had with exploded war deployment inside IntelliJ, including with tomcat. I also needed to delete the warfile from `target` with IntelliJ 2018.3, as the ide build preceding the deploy does not create the directory if a file with the same name exists. – Sofia Paixão May 15 '19 at 11:53