1

When using intelliJ, is there a way to automatically run maven compile after code changes? running mvn compile is too tedious each time.

Robert Li
  • 771
  • 1
  • 8
  • 14
  • Please provide more information. When would you like to compile the code? While the application is running? – Lino Jul 20 '18 at 07:43
  • [Use file watchers](https://www.jetbrains.com/help/idea/using-file-watchers.html) – Adelin Jul 20 '18 at 07:44
  • 1
    Possible duplicate of [Intellij IDEA Java classes not auto compiling on save](https://stackoverflow.com/questions/12744303/intellij-idea-java-classes-not-auto-compiling-on-save) – malware Jul 20 '18 at 07:57

2 Answers2

4
  1. Access Settings (Preferences on macOS). Select Build, Execution, Deployment > Compiler.
  2. Enable Build project automatically. Press OK.
  3. Press Ctrl+Shift+A (Cmd+Shift+A on macOS) and search for Registry. Open it to find and enable compiler.automake.allow.when.app.running (IntelliJ IDEA 15 and newer).

Source: https://zeroturnaround.com/software/jrebel/quickstart/intellij/enable-automatic-compilation-in-intellij-idea/

malware
  • 393
  • 1
  • 3
  • 16
1

Have a look at JRebel Plugin. If you are working with web apps its great.

Mladen Savić
  • 472
  • 4
  • 10