IntelliJ从12版本升级到13版本后,以下maven相关插件无法解决:

org.apache.maven.plugins:maven-clean-plugin:2.4.1
org.apache.maven.plugins:maven-deploy-plugin
org.apache.maven.plugins:maven-install-plugin
org.apache.maven.plugins:maven-site-plugin

在使用IntelliJ 12时,这些不在插件列表中。不知何故,它们在更新后被添加,现在IntelliJ抱怨无法找到它们。我可以在哪里从列表中删除这些插件或通过安装它们来解决问题?

我可以运行maven目标干净和编译没有问题,但配置文件/插件在IDE中显示红色警告。

8年后编辑:也请看看这里所有其他好的答案。公认的答案是一个常见的解决方案,但可能不适用于您或您的IDE版本


当前回答

解决了! !

这就是我解决问题的方法……

Tried one of the answers which include 'could solve it by enabling "use plugin registry" '. Did enable that but no luck. Tried again one of the answers in the thread which says 'If that does not work, Invalidate your caches (File > Invalidate caches) and restart.' Did that but again no luck. Tried These options .. Go to Settings --> Maven --> Importing and made sure the following was selected Import Maven projects automatically Create IDEA modules for aggregator projects Keep source... Exclude build dir... Use Maven output... Generated souces folders: "detect automatically" Phase to be...: "process-resources" Automatically download: "sources" & "documentation" Use Maven3 to import project VM options for importer: -Xmx512m But again no success. Now lets say I had 10 such plugins which didn't get resolve and among them the first was 'org.apache.maven.plugins:maven-site-plugin' I went to '.m2/repository/org/apache/maven/plugins/' and deleted the directory 'maven-site-plugin' and did a maven reimport again. Guess what, particular missing plugin got dowloaded. And I just followed similar steps for other missing plugins and all got resolved.

其他回答

对我来说,插件是与概要文件相关的。 我必须通过Maven(右侧栏菜单)启用相关的配置文件,配置文件并让依赖项下载。

从maven工具窗口运行Force重新导入。如果不工作,Invalidate你的缓存(文件> Invalidate缓存)并重新启动。等待IDEA重新索引项目。

这些方法对我来说都没用。在经历了痛苦的几个小时后,我发现这个问题是由我导入项目的方式引起的。

上下文:导入带有Web和Kafka依赖项的新生成的Spring Initializr项目。

问题:插件依赖“未找到”,IntelliJ无法编译应用程序,即使mvn清洁编译在控制台上运行良好。

坏的方法:使用“New > Project from Existing Sources…”选项导入它。

好的方法是:使用“Open…”选项导入它。

从坏到好的解决方案:删除项目,从版本控制中删除并重新克隆repo,以确保所有gitignored IntelliJ文件都被删除,并使用“Open…”选项将其导入IntelliJ。

我遇到了同样的错误,并通过删除旧的Maven设置文件来摆脱它。然后我手动使用mvn命令更新Maven插件:

mv ~/.m2/settings.xml ~/.m2/settings.xml.old
mvn -up

最后,我在IntelliJ的Maven项目选项卡中运行了“重新导入所有Maven项目”按钮。在我的案例中,错误消失了。

红色警告maven-site-plugin在构建站点生命周期后解决:

我的IntelliJ版本是Community 2017.2.4