Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven dependency not found

Me and my friend are working on a Java maven project, the setup is identical as we get the project from git. On my setup Maven imports all dependencies correctly but for my friend it won't find any dependencies.

Things we have tried:

  • Uninstalling and reinstalling Intellij

  • Invalidate caches/Restart

  • Deleting the maven folder in the .Intellij folder and deleting the *.iml and .idea folder and restarted Intellij

  • Right click on project, clicked on maven and clicked reimport.

We both have access to the internet so that shouldn't be the problem either. Also, Maven is set to auto-import in Intellij.

like image 925
ZeppRock Avatar asked Apr 21 '17 07:04

ZeppRock


People also ask

How do I fix dependency not found in IntelliJ?

If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.


1 Answers

I think the problem is not IntelliJ, I think maven can not download the dependencies, so you can try to force the dependencies download with the following command:

mvn clean install -U 
like image 133
JUAN CALVOPINA M Avatar answered Oct 04 '22 13:10

JUAN CALVOPINA M