Unable to import maven project in IntelliJ14

后端 未结 10 1483
一向
一向 2021-02-01 01:21

I\'m trying to import the Maven projects from IntelliJ button (the one with the arrows in circle), but I get the following message \"Unable to import maven project. See logs for

相关标签:
10条回答
  • 2021-02-01 02:03

    I got into this same state (unable to import maven project) several times (i was running a load test and hitting the max number of open files on the OS, so normal file saves were erroring out). It probably is a corrupt file causing this. A computer reboot acutally solved it a few times but other times I solved it by switching to command line and running "mvn clean install"

    0 讨论(0)
  • 2021-02-01 02:17

    I don't know what caused this, all i know it was very easy to fix:

    1. Download maven here and extract it in a place of your choice.
    2. Then, go to File>Settings>Build, Execution, Deployment>Build Tools>Maven.
    3. In Maven home directory, instead of Bundled maven, point it to the folder you just created.
    4. Enjoy.
    0 讨论(0)
  • 2021-02-01 02:18

    Solved. I had to remove the IntelliJ project folder (.idea) and create a new project from the existing source clicking on the parent pom. Then, everything worked properly.

    I guess that some file was corrupted.


    In steps. Initially you have something like:

    After deleting the .idea folder you will have:

    So you close the project and start one from existing sources:

    You select the pom.xml file to create the new project and oveeride the IntelliJ project if one was found.

    Now you should see exactly the same as in the first picture.

    0 讨论(0)
  • 2021-02-01 02:20

    This worked for me

    1. Go to: File > Settings > Build,Execution,Deployment > Build Tools > Maven > Importing

    2. Change: JDK for importer to your installed JDK instead of IDEA's internal JRE (Use Internal JRE from ../JetBrains/IntelliJ IDEA/jre64)

    Also searching in IDEA log files helped me. I found this message:

    Caused by: java.io.IOException: Cannot run program "C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.2\jre64\bin\java" (in directory "C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.2\bin"): CreateProcess error=2, File not found

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