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设置中的“脱机工作”复选框。

其他回答

对我来说,我手动下载它们,把主题放在我的。m2文件夹里,然后我使缓存无效并重新启动(我使用Intellij IDEA)。 具体步骤如下:

< groupId > org . codehaus < / groupId >的魔力。 < artifactId > jdepend-maven-plugin < / artifactId > < 2.0版本> < /版>

I go to https://mvnrepository.com/ then serch for jdepend-maven-plugin choose the version 2.0 In Files go and click on View All Download this files jdepend-maven-plugin-2.0.jar jdepend-maven-plugin-2.0.jar.sh1 jdepend-maven-plugin-2.0.pom jdepend-maven-plugin-2.0.pom.sh1 go to .m2 folder then org/codehaus/mojo Create folder with name jdepend-maven-plugin inside with name 2.0 inside put the 4 files downloaded befor. create file with name _remote.repositories open it with text editor and write inside

jdepend-maven-plugin-2.0.jar中部> = jdepend-maven-plugin-2.0.pom中部> =

去intellij IDEA使缓存无效并重新启动。

检查找不到的插件(maven-site-plugin,maven-resources-plugin) 转到"。m2/repository/org/apache/maven/plugins/ " 删除目录rm -rf plugin-directory-name(例如:rm -rf maven-site-plugin) 从intellij退出项目 重新导入项目 是否重新导入Maven

解释:当你重新导入maven时,它会再次下载所有丢失的插件。

快乐的编码

取消选中Maven设置中的“脱机工作”复选框。

这对我来说很管用……删除“C:\Users[Windows用户帐户].m2\repository”下的所有文件夹和文件。

最后在IntelliJ的Maven项目选项卡中运行“重新导入所有Maven项目”。

其他的解决方法对我都不起作用。

我的解决方案:

Maven设置->存储库->在列表中选择“本地存储库”,单击“更新”

效果好极了!