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


当前回答

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

其他回答

其他的答案都对我没用。对我来说有效的解决方案是通过cmd手动下载丢失的工件:

mvn dependency:get -DrepoUrl=http://repo.maven.apache.org/maven2/ -Dartifact=ro.isdc.wro4j:wro4j-maven-plugin:1.8.0

在此更改之后,需要让Idea了解新的可用工件。这可以在“设置> Maven >存储库”中完成,选择那里的“本地”,然后简单地单击“更新”。

编辑:-DrepoUrl似乎已弃用。- dremoterepository应该用。来源:Apache 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.

必须添加依赖项

这个问题很老了,但我希望我的答案能帮助那些找到它的人

参考 (链接) https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-dependency-plugin/3.1.1

<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-dependency-plugin -->
<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>3.1.1</version>
</dependency>

就我而言,我尝试了上面的大部分答案。我解决这个问题的方法是:

清理.m2/repository文件夹中的所有项目 卸载Intellij终极版本 安装社区版本

它如此神奇地有效!

这对我很有效

进入设置—> Maven—>导入—>导入器的JDK—> 使用“使用项目JDK”选项,而不是之前的自定义JDK集。 重新构建/重新导入所有依赖项。