2

I'm using IntelliJ 14.1.1 on Windows.

I have a project (mainly java) with a little web module, built with maven. In my web module, I'd like to accomplish this scenario :

  • I edit a Javascript file located in the web module, folder resources/js
  • When IntelliJ automatically saves the file, I'd like it to be copied automatically to target/classes so that my web server detects the change and reload it automatically. My goal is to have immedlate feedback : I edit a JS file, and then I have it available in my browser.

The only way I found is to go to "Maven Project", and assign a shortcut to the maven goal which compiles the module. But this takes too long, and it's far from the "Ctrl+S" of Eclipse (Eclipse auto build let me have this behavior).

I also tried to use the File Watcher option of IntelliJ, but it seems it can only parse less/css and I cannot make a simple copy of file/folder with it.

Any help would be welcome to achieve such an immediate feedback on typing in IntelliJ.

Thank you

SmeagolGollum
  • 107
  • 1
  • 14
  • This has always worked for me by selecting "Update Resources" as "On Frame Deactivation" action in Run/Debug configuration. Have you tried that? – Bohuslav Burghardt Apr 14 '15 at 15:54
  • If I create a maven type Run/Debug configuration, there is no "Update Resources" in the sceens. – SmeagolGollum Jul 02 '15 at 08:32
  • I made very good experiences with [JRebel](https://zeroturnaround.com/) in this case. See also [IntelliJ and Tomcat…changed files are not automatically recognized by Tomcat](http://stackoverflow.com/q/19596779/873282). – koppor Jan 11 '17 at 02:02

0 Answers0