Maven项目生成,但依赖关系似乎在IntelliJ IDEA中不可用 [英] Maven project builds but dependencies seem to be unavailable in IntelliJ IDEA

查看:57
本文介绍了Maven项目生成,但依赖关系似乎在IntelliJ IDEA中不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个多级Maven项目,可以使用 mvn clean install 在命令行上很好地构建,并通过手动运行父项目的 clean 构建在IntelliJ IDEA(2019.3)中.code>和 install 阶段.问题"视图显示没有错.当我打开具有某些外部库的文件时,它们显示为无法解析:

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:

我通常能够在项目浏览器中浏览外部库的内容.我注意到列出了IntelliJ找不到的这些外部库,但它们不可浏览.

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.

使用相同的代码库和相同的IntelliJ版本在我们的项目上工作的其他人似乎没有此问题.我尝试过:

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:

  • 重新导入所有Maven项目"
  • 文件->使缓存无效/重新启动
  • 完全删除我的〜/.m2/存储库
  • 完全删除我的 $ PROJECT_ROOT/.idea 目录并重新导入
  • 从头开始重新克隆并重新导入项目

以上似乎都不起作用.

推荐答案

此问题的根本原因尚未确定,仍在调查中,但是可以提供帮助的是

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.

这篇关于Maven项目生成,但依赖关系似乎在IntelliJ IDEA中不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆