Maven project builds but dependencies seem to be unavailable in IntelliJ IDEA

时光总嘲笑我的痴心妄想 提交于 2021-02-09 09:33:11

问题


I have a multi-level Maven project that builds fine on the command-line using mvn clean install and builds in IntelliJ IDEA (2019.3) by manually running the parent project's clean and install phase. The Problems view shows nothing wrong. When I open files that have certain external libraries, they show as being unable to be resolved:

I'm usually able to browse external libraries' contents in the project browser. I've noticed that these external libraries IntelliJ can't find are listed but not browsable.

Other people working on our project with the same code base and same IntelliJ version don't seem to have this problem. I've tried:

  • "Reimport all Maven projects"
  • File -> Invalidate Caches/Restart
  • Completely deleting my ~/.m2/repository
  • Completely deleting my $PROJECT_ROOT/.idea directory and reimporting
  • Recloning and reimporting the project from scratch

None of the above seem to work.


回答1:


The root case for this problem was not identified and is still under investigation, but what can help is removing the IDE settings and starting with the defaults.



来源:https://stackoverflow.com/questions/60569110/maven-project-builds-but-dependencies-seem-to-be-unavailable-in-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!