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
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"
I don't know what caused this, all i know it was very easy to fix:
File
>Settings
>Build, Execution, Deployment
>Build
Tools
>Maven
.Maven home directory
, instead of Bundled maven, point it to the
folder you just created.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.
This worked for me
Go to: File > Settings > Build,Execution,Deployment > Build Tools >
Maven > Importing
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