0
votes

My IntelliJ today just decided to stop importing my dependencies. Running "mvn clean install" normally downloads all the dependencies, but then they are not imported in "External Libraries" at all. It's been all day and I tried a ton of things found online, but nothing worked.

Things I tried:

  • Changing the Maven used and changing from the bundled one to my own
  • The buttons Reload Maven Projects and Download Sources do nothing, they start and stop in under a second
  • File -> Invalidate Cache/Restart
  • Deleting .idea folder
  • I have localhost mapped

No, it's not only a visual problem because the libraries result as not resolved.

Thanks in advance!

2
try to press in the right side of intelij the button that refreshes maven dependencies. It is called "reload all maven projects"Panagiotis Bougioukos
First not on 2020.3. ?khmarbaise
What does “ I have localhost mapped” meanThorbjørn Ravn Andersen
I already tried that button. No not 2020.3 because it has some issues with lombok right now. Localhost mapped means that i set 127.0.0.0 as localhost in hosts file, I’ve seen that as a solution somewhere.Umberto
Try also File | New | Project from Existing Sources... action and select the pom.xml file to import from. Do you have antivirus/firewall active?Andrey

2 Answers

0
votes

I think what you need to do is push the "Reload Maven Projects" button in the top-right hand corner of the screen. If it's not there, you need to expand the maven tab.

enter image description here

0
votes

Ok I solved it. I had ${version} in the pom because I was using the command "mvn clean install -Dversion=1" to pass that as parameter. Apparently IntelliJ does his checks on the pom before the build even starts, so changing the version directly in the pom did the trick!