找不到Maven依赖项 [英] Maven dependency not found
问题描述
我和我的朋友正在从事Java Maven项目,其设置与从git获得项目的设置相同.在我的设置中,Maven可以正确导入所有依赖关系,但对我的朋友来说,它将找不到任何依赖关系.
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.
我们尝试过的事情:
-
卸载并重新安装Intellij
Uninstalling and reinstalling Intellij
使缓存无效/重新启动
删除.Intellij文件夹中的maven文件夹,并删除* .iml和.idea文件夹,然后重新启动Intellij
Deleting the maven folder in the .Intellij folder and deleting the *.iml and .idea folder and restarted Intellij
右键单击项目,单击maven,然后单击重新导入.
Right click on project, clicked on maven and clicked reimport.
我们俩都可以访问互联网,所以也不应该成为问题.此外,Maven设置为在Intellij中自动导入.
We both have access to the internet so that shouldn't be the problem either. Also, Maven is set to auto-import in Intellij.
推荐答案
我认为问题不是IntelliJ,我认为maven无法下载依赖项,因此您可以尝试使用以下命令强制下载依赖项:>
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
这篇关于找不到Maven依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!