Unable to import Maven project into IntelliJ IDEA

前端 未结 12 931
春和景丽
春和景丽 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:29

    I'm using the community edition 2017.2.1 and I had the same issue, I had to change the JDK version of the maven importer to the correct version(from 1.6 to 1.8) to make it work.

    0 讨论(0)
  • 2020-12-01 08:29

    To correct this issue for me in 14.1.3 Ultimate, I had to add

    -Didea.maven3.use.compat.resolver

    to VM options for importer under Preferences > Build, Execution, Deployment > Build Tools > Importing

    per the bug at https://youtrack.jetbrains.com/issue/IDEA-140208.

    0 讨论(0)
  • 2020-12-01 08:32

    Had the same issue, however the following answer fixed my problem: Maven project won't compile after upgrade to Intellij 13.1 from 12

    The problem itself occured after I updated to IntelliJ 13.1.4, pre to that patch all worked fine/as intended.

    0 讨论(0)
  • 2020-12-01 08:34

    I faced the same problem. Sorry, none of the above suggestions worked for me. In fact when I launch the gradle project from IntelliJ, I got error as "Connection refused: connect" in the event log. I tried various options like setting -Djava.net.preferIPv4Addresses=true, windows hot fix, installing ISA Client, Restarting machine, switched java lang level, disabled firewall. Nothing helped.

    Finally giving the proxy information in the IntelliJ Idea does the trick for me.

    enter image description here

    Give the same proxy information as in your internet properties for IntelliJ proxy settings. enter image description here

    0 讨论(0)
  • 2020-12-01 08:36

    I had a similar issue running groovy script with IDEA 12. The problem was the same as @CrazyCoder stated. Solution was based on what @kevinmrohr did just a little easier to find and setup.

    To solve the problem I edited idea.exe.vmoptions located in the bin directory (idea64.exe.vmoptions if you are using 64 bit version) and added -Djava.net.preferIPv4Stack=true.

    Restarted IDEA and everything was working without any issues.

    0 讨论(0)
  • 2020-12-01 08:38

    Look for any (recently installed) applications that might prevent RemoteMavenServer from responding to Intellij's calls correctly. In my case, it turned out to be a an online accountability software:x3watch. After uninstalling it, Intellij started working fine.

    0 讨论(0)
提交回复
热议问题