'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.
Solution 1:[1]
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
Solution 2:[2]
if all needed maven jars have been downloaded ,
try update the local repository manually in setting---maven---repositories.
Solution 3:[3]
Here is what I have done when I was facing the same problem, Right Click Project folder Go to Maven Reload Project, it should download the dependencies.
Solution 4:[4]
You could do try with the following solutions:
1.Check if your friend is using any proxy, if so add the proxy settings in the settings.xml of maven folder.
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>somthing.com</host>
<port>portnumber</port>
</proxy>
</proxies>
- update maven and then check with latest version whether you are able to download.
- you could manually download jars and then update the repository settings in settings.xml
Solution 5:[5]
For me, I open the maven tab I observe the jar was broken. I did the below steps to resolve the issue.
- Remove that not found dependency in the pom
- Refresh the maven to remove that broken jar
- Add the dependency back to the pom, then refresh the maven to redownload the jars.
it worked for me.
Solution 6:[6]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | JUAN CALVOPINA M |
| Solution 2 | Mobility |
| Solution 3 | user17465424 |
| Solution 4 | Kaiizok |
| Solution 5 | tran tan |
| Solution 6 | urmat abdykerimov |

