Background compilation (auto-build)You can configure IntelliJ IDEA to build your project automatically, every time you make changes to it.
Open the Setting > Build Tools page. 2. Disable the "Reload changes in build scripts" option.
For IntelliJ IDEA 12+ releases we can build automatically the edited sources if we are using the external compiler option. The only thing needed is to check the option "Build project automatically", located under "Compiler" settings:
Also, if you would like to hot deploy, while the application is running or if you are using spring boot devtools you should enable the compiler.automake.allow.when.app.running
from registry too. This will automatically compile your changes.
Using Ctrl+Shift+A (or ⌘+Shift+A on Mac) type Registry
once the registry windows is open, locate and enable compiler.automake.allow.when.app.running
, see here:
For more tips see the "Migrating From Eclipse to IntelliJ IDEA" guide.
Please follow both steps:
make project automatically
Make Project automatically
featureRegistry
compiler.automake.allow.when.app.running
and enable it or click the checkbox next to itNote: Restart your application now :)
Note: This should also allow live reload with spring boot devtools.
Eclipse Mode plug-in is obsolete and is not compatible with the recent IDEA 12+ builds. If you install it, IDE will hang on every file change and will respond extremely slow.
IntelliJ IDEA doesn't use automatic build, it detects errors on the fly, not via compiler. Similar to Eclipse mode will be available in IDEA 12:
Use Build
| Make
, it invokes the incremental make process that will compile only changed and dependent files (it's very fast).
There is also a FAQ entry that may help.
Update on the automatic make feature:
When run/debug configuration is running, Make project automatically
has no effect. Classes on disk will change only on Build
| Make
. It's the core design decision as in our opinion class changes on disk should be always under user's control. Automatic make is not the copycat of Eclipse feature, it works differently and it's main purpose is to save time waiting for the classes to be ready when they are really needed (before running the app or tests). Automatic make doesn't replace the explicit compilation that you still need to trigger like in the case described in this question. If you are looking for different behavior, EclipseMode plug-in linked in the FAQ above would be a better choice.
You can keymap ctrl+s
to save AND compile in one step. Go to the keymap settings and search for Compile
.
There is actually no difference as both require 1 click:
Simplest solution is just to get used to it. Because when you spend most of your daytime in your IDE, then better have fast habits in one than slow habits in several of them.
I ended up recording a Macro to save and compile in one step, and keymap Ctrl+s
to it.
I managed to solve this using macros.
I started recording a macro:
Name it something useful like, "SaveAndMake".
Now just remove the Save all keybinding, and add the same keybinding to your macro!
So now, every time i save, it saves and makes a dirty compile, and jRebel now detects all changes correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With