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版本


当前回答

我也有同样的问题,在检查pom.xml文件后,发现我有重复的插件。删除后,在pom.xml中只留下1 -问题解决。

还有maven-surefire-report-plugin == LATEST 而且

     <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.9.8</version>
    </dependency>

其他回答

尝试了无效缓存,重新导入项目,部分和整体删除.m2文件夹,并切换到Idea捆绑的Maven。 没有任何工作,我最终完全破坏了Maven:当它在控制台中构建项目时,现在它停止了。 不得不重新安装Maven,它帮了大忙!

解决了! !

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

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.

对我来说,在settings.xml中有一个错误。我在url中使用http://,因为它不能工作。一旦我删除它,插件下载成功。

<proxy>
   <id>optional</id>
   <active>true</active>
   <protocol>http</protocol>
   <host>www-proxy.xxxx.com</host>
   <port>80</port>
  <!-- <nonProxyHosts>local.net</nonProxyHosts>-->
  </proxy>

  <!-- Proxy for HTTPS -->
  <proxy>
   <id>optional1</id>
   <active>true</active>
   <protocol>https</protocol>
   <host>www-proxy.xxxx.com</host>
   <port>80</port>
   <!--<nonProxyHosts>local.net</nonProxyHosts>-->
  </proxy>

IntelliJ IDEA和Maven -“未解决的插件”解决方案”-特别是删除插件文件夹-然后在ide重启后重新导入所有Maven插件-对我有用。

在我的例子中,在两个maven子模块中有两个略有不同的依赖项(版本2.1 vs 2.0)。在我切换到单一版本后,错误已经在IDEA 14中消失了。(刷新和。m2滑动没有帮助。)