[英]Trying to import maven project but some dependencies are missing in eclipse after the import
I have tried everything but nothing worked for me.我已经尝试了一切,但没有任何效果对我有用。 Some of maven dependencies are missing in the eclipse but are present in the pom.xml file and local repository Any help would be much appreciated
eclipse 中缺少一些 maven 依赖项,但存在于 pom.xml 文件和本地存储库中任何帮助将不胜感激
Assuming you correctly imported the project, the problem could be that you don't have the repositories defined that contain the dependencies you want to use.假设您正确导入了项目,问题可能是您没有定义包含要使用的依赖项的存储库。
See https://maven.apache.org/guides/introduction/introduction-to-repositories.html for more information on how to define your repositories.有关如何定义存储库的更多信息,请参阅https://maven.apache.org/guides/introduction/introduction-to-repositories.html 。
Ideally When you run a Maven build, then Maven automatically downloads all the dependency jars into the local repository but I ran into the similar problem before and updating the maven project did the trick for me project>maven>update project理想情况下,当您运行 Maven 构建时,Maven 会自动将所有依赖项 jar 下载到本地存储库中,但我之前遇到了类似的问题,并且更新 Maven 项目对我来说是一个窍门project>maven>update project
below I have explained whole thing from build to updating with screen shots hoping it helps you下面我用屏幕截图解释了从构建到更新的整个过程,希望对您有所帮助
PS if you have JARs downloaded locally you can add them manually to your build path right click project>properties to resolve the issue PS如果您在本地下载了JAR,您可以将它们手动添加到您的构建路径中右键单击项目>属性以解决问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.