When creating IntelliJ → New Project → Maven, the archetype list is blank and does not populate no matter how long the amount of time elapsed. The "Loading archetype list..." continues but does not appear to do much. Any suggestions?
Info from mvn -v
:
Apache Maven 3.2.5 (NON-CANONICAL_2014-12-25T17:13:28_root; 2014-12-25T05:13:28-08:00)
Maven home: /opt/maven
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.17.6-1-arch", arch: "amd64", family: "unix"
IntelliJ IDEA Professional 14.0.2
I have faced the similar problem. After looking at IDE log, I have figured out it was not able to connect the localhost. It was showing below exception :
I have found the solution mentioned in the below link which has worked for me Unable to import Maven project into IntelliJ IDEA
You can try change VM options for importer: -Xmx2048M Settings -> Maven -> Importing. Tested on IntelliJ IDEA 2016.3.4, JRE 1.8.0_111
https://www.youtube.com/watch?v=un8S3t1N4FY
In my case, I had solve this.
'$JAVA_HOME/jre/bin/java' file is not have permission of run.
(http://1004lucifer.blogspot.kr/2015/08/intellij-loading-archetype-list.html)
Changing the Settings->Maven->Importing->JDK for importer selection did not work for me. But clearing the "-Xmx512m" value that was in Settings->Maven->Importing->VM options for importer did. After clearing that value and saving the settings, the Maven archetype list for New Module loaded immediately in IntelliJ IDEA Professional 14.0.3.
The max memory did the trick for me as well, IntelliJ Community Edition 2016.2.4
Here's a screenshot of the settings if it helps:
After checking the idea.log under ~/Library/Logs/IntelliJIdea13/, I found there was an excpetion being thrown Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused. The root cause was my /etc/hosts file got corrupted somehow and the localhost ip was updated to some garbage value. After changing the localhost mapping to 127.0.0.1, my problem got resolved