Intellij Idea taking forever to resolve maven dependencies

后端 未结 2 884
渐次进展
渐次进展 2021-02-18 21:53

I am using intellij idea ultimate version 12.1.4 and trying to use maven with a project. Here is my pom.xml:


<         


        
2条回答
  •  故里飘歌
    2021-02-18 22:10

    File | Settings | Build, Execution, Deployment | Build Tools | Maven | Threads (-T option) | 16 (or however many threads you want to try)

    mvn compile -T 8
    

    I had the same issue. Maven was taking an hour in IntelliJ and also running from the command line. Using the -T parameter you can tell Maven to use more threads to download artifacts simultaneously. Takes only about 15 minutes now.

    Don't use bundled mvn. Point "Maven home directory" to the path on your file system.

    After you're done building. Check "Work offline". This stops mvn from searching remote websites each time you build. Uncheck when you update your POM file so it can search for the changes.

    You can also skip tests. This is evertyhing from the command line.

    mvn clean install -T 50 -o -DskipTests 
    

提交回复
热议问题