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


当前回答

我使用的是Ubuntu 18.04中打包为snap的社区版。

每次IntelliJ发布时,我都会遇到这个问题。

在该场景中,我的工作解决方案是调用invalidate缓存,并从标记索引删除的文件menù重新启动。

其他回答

其他的答案都对我没用。对我来说有效的解决方案是通过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依赖插件-依赖:获得。

对我来说,我手动下载它们,把主题放在我的。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使缓存无效并重新启动。

如果你已经尝试清除你的.m2文件夹,使用“Invalidate Caches”和“Restart”,仔细检查POM文件中的插件声明,那么:

1. 检查IntelliJ Maven配置

Ctrl + Shift +一个 输入“Maven设置” 勾选“使用插件注册表” 再次检查“Maven主路径”和“用户设置文件” 尝试获取额外的日志:将“输出级别”设置为“调试”,然后单击“应用”

2. 检查IntelliJ Java配置

Ctrl + Shift +一个 输入“进口” 仔细检查“JDK for importer”中使用的JDK

3.更新cacerts keystore文件

请确保您信任远程Maven存储库的TLS服务器证书。为此,将公共证书添加到/path/to/jdk/jre/lib/security/下的cacerts密钥存储库(例如使用https://keystore-explorer.org/) -默认密码为“changeit”

如果你不能编辑文件:

Ctrl + Shift +一个 输入“进口” 更新“导入器的虚拟机选项”-Djavax.net.ssl.trustStore=/path/to/cacerts -Djavax.net.ssl.trustStorePassword=changeit然后单击“应用”

从下面删除所有文件夹,并执行“重新加载所有Maven项目”刷新按钮,这对我来说很有效。

C:\Users\<username>\.m2\repository\org\apache\maven\plugins

最近我也遇到了同样的问题。 所有的建议对我的事业都不起作用。

但我把它修好了。

转到Intellij idea设置,找到Maven,在其中打开Repository选项卡并更新Maven和本地repos。这是所有。