pom.xml no such file or directory

醉酒当歌 提交于 2019-12-05 13:57:18

Had "No such file or directory" error on pom.xml in Eclipse Luna SR1.

Tracked it down to be caused by faulty resolution of other projects within the workspace by M2E.

So there are 2 solutions:

  1. Either close the other project in the workspace (a dependency of the project in error).
  2. Or disable workspace resolution by M2E on the project in error (right-click on the project, Maven --> Disable Workspace Resolution).

Obviously, if you need both projects open then option 2. is the way to go. The dependent project then takes the dependency from the local Maven repo, so to refresh it, you have to build and install the dependency into the local repo (mvn install).

Uros Majeric

I have the same issue. Still didn't find any smart solution, but this sometimes works for me:

  • Close eclipse
  • Go to console and do a maven clean install with update flag "mvn clean install -U"
  • Reboot the computer (logging out and back in didn't help)
  • Start eclipse and refresh and rebuild your projects
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!