Unable to import Maven project into IntelliJ IDEA

前端 未结 12 955
春和景丽
春和景丽 2020-12-01 07:41

I\'m having problems importing any Maven projects into IntelliJ IDEA. I create an empty Maven project like this:

$ mvn archetype:generate -DgroupId=com.mycom         


        
12条回答
  •  情书的邮戳
    2020-12-01 08:27

    Find out what process on your machine is holding the port. On Ubuntu Linux, I executed the following commands:

    ps -ef | grep idea

    Noticed that there is a Java process running the class org.jetbrains.idea.maven.server.RemoteMavenServer

    I noted the pid of 2772 and executed

    netstat -anp | grep 2772

    I noted that pid 2772 was listening on port 6942

    I telneted to that port:

    telnet localhost 6942
    Trying 127.0.0.1...  
    Connected to localhost.
    Escape character is '^]'.
    /home/noahlz/.IdeaIC11/config/ home/noahlz/.IdeaIC11/system
    

    So the Maven component used by IntelliJ runs as a distinct server process, which IntelliJ speaks to over a socket. You'll need to determine why IntelliJ can't reach that server port on your machine, i.e. what other process is holding onto that port and/or not sending a response back to IntelliJ

    Note that the port number on your machine might be different.

提交回复
热议问题