Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ 14.1 is too slow when I import a Maven project

If I import a Maven project (Import Project > choose the main pom.xml file > check Import Maven projects automatically > Next ...):

  • in IntelliJ IDEA 14.1 Ultimate Edition it takes about 5 hours until is ready.
  • in IntelliJ IDEA 14.0.3 Ultimate Edition it was about 20 times faster.

During the processing, if I maximize a popup it looks like: enter image description here

The modules (folders) in the Project area are shown only at the end (only the files from the main directory are shown during the "resolving" - in this case immediately).

The jar files are already in the .m2 folder, so the problem is not related to the time for downloading those jars.

Is there a "hidden" setting needed to improve the performance? (a check box, a command, etc.)

Details:

  • Windows 7
  • Java 7
  • Apache Maven 3.2.1

Edit:

  • JDK, Maven, .m2, IntelliJ IDEA and the project sources are on the same drive
  • JetBrains wrote:

    Your projects open faster and the IDE is more responsive as some processes now run in the background.

    regarding IntelliJ IDEA 14.1 and probably it is faster but (at least for me) not using the default settings.

like image 321
ROMANIA_engineer Avatar asked Mar 26 '15 13:03

ROMANIA_engineer


People also ask

Why is IntelliJ not importing Maven dependencies?

If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.


2 Answers

If you use the bundled Maven that comes with Idea 14.1, have a look here: Slow Intellij IDEA deployment . Using an installed Maven seems to be much faster.

enter image description here

Another improvement could be to change the JDK for importer (and probably the VM options for importer) from Use internal JRE to your own JDK: enter image description here

like image 143
Alexander Avatar answered Sep 18 '22 08:09

Alexander


  1. It's all because Maven version. Maven 3.0.5 or Maven 2.x use simplified dependency resolution so often it can be used during import for big projects. Thought it can work incorrect for some projects which uses 3.1+ Maven.
  2. Switching off auto-importing is another solution.
like image 36
Denis Rozhnev Avatar answered Sep 21 '22 08:09

Denis Rozhnev