IntelliJ不反映Maven依赖项

IntelliJ不反映Maven依赖项

本文介绍了IntelliJ不反映Maven依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近更新了我的 IntelliJ ,我遇到了一个问题,它在类路径中显示导入语句不存在,尽管项目构建正常,但是从命令行mvn clean [install | verify] ,软件实际可行。因此依赖关系肯定存在,但IDE似乎有一个与pom文件同步的错误。我试过 Maven - >多次重新导入,但没有成功。

I recently updated my IntelliJ and I am having a problem with it showing import statements as nonexistent in the classpath despite the project building fine by doing mvn clean [install|verify] from the command line and the software actually works. So the dependencies are certainly there but the IDE seems to have a bug synchronizing against the pom file. I have tried to Maven --> Reimport multiple times, without success.

考虑到我最近更新了IntelliJ(该版本截至2017年7月15日),是否可以是一个新引入的错误,是否有解决方法?

Considering that I recently updated IntelliJ (the version is as of 7/15/2017), could this be a newly introduced bug and is there a workaround?

推荐答案

问题可能是由影响2017.2版本。此错误已在中修复。

The problem may be caused by a known bug in Maven integration which affects 2017.2 version. This bug is fixed in 2017.2.1 version.

您可以通过搜索:

You can find out if it's the case of your problem by searching idea.log for:

java.lang.AbstractMethodError: org.jetbrains.idea.maven.server.embedder.CustomModelValidator$ProxyModelProblemCollector.add(Lorg/apache/maven/model/building/ModelProblemCollectorRequest;)V

这篇关于IntelliJ不反映Maven依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 19:22