且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

m2eclipse 找不到 Maven 依赖项,找不到工件

更新时间:2022-05-21 18:29:06

我在其他项目中创建的依赖项中遇到了这个问题.下载的第三方依赖项在构建路径中显示正常,但不是我创建的库.

I had this issue for dependencies that were created in other projects. Downloaded thirdparty dependencies showed up fine in the build path, but not a library that I had created.

解决方案:在未正确构建的项目中,右键单击该项目并选择属性,然后选择 Maven.取消选中标有解决工作区项目中的依赖项"的框,点击应用,然后点击确定.再次右键单击您的项目并执行 Maven->Update Snapshots(或 Update Dependencies),当您的项目重新构建时,您的错误应该会消失(如果您启用了自动构建,则会自动消失).

SOLUTION: In the project that is not building correctly, right-click on the project and choose Properties, and then Maven. Uncheck the box labeled "Resolve dependencies from Workspace projects", hit Apply, and then OK. Right-click again on your project and do a Maven->Update Snapshots (or Update Dependencies) and your errors should go away when your project rebuilds (automatically if you have auto-build enabled).