IntelliJ Maven integration - project rebuild


I'm fairly new to intelliJ and I'm wondering why intelliJ takes so long to run for example a unittest in my project although I have compiled it via maven goals seconds ago.

What is the reason for intelliJ to recompile it again on it's own?
Am I doing something wrong?

I hope the question has not been answered before, at least I didn't find an answer with the search terms, I have used ;-)


Comment actions Permalink

Patrick, if for your run configuration option "make before run" is on, then IDEA would make the project by itsown. In order to disable such behaviour you may switch the option off, and if you don't need IDEA to make any test configuration before run, then you may change the default configuration (by default the option to make before run is on)

Comment actions Permalink

Thanks for the tip, but that is a problem if I change something in the test and try to start it then, right? The change is not compiled and runs the old version.

I have no problem that intelliJ compiles for example the current test, that I want to run.
The big time consuming step is that it compiles/scans/parses (almost?) the whole project without any need, because there
is no file that depends on my test and the files that my test depends on are not changed since the last maven build.

I think the problem is that it relies only on itself to compile the stuff and doesn't take advantage of mavens compiled classes or the capability  to compile the files for it.


Please sign in to leave a comment.