Maven plugins can not be found in IntelliJ

2020-02-07 17:25发布

After I updated my IntelliJ version from 12 to 13, I see errors on my Maven Profile/Project/Plugins saying the following plugins can not be resolved:

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

While I was using IntelliJ 12 these were not in my plugins list, somehow they are added after the update and now it complains they can not be found, where can I remove these plugins from the list OR resolve the problem by installing them?

I can run maven goals clean and compile without problem, but the profile/plugins just looks all in red with warnings which I don't like.

26条回答
老娘就宠你
2楼-- · 2020-02-07 18:29

I had the same error and was able to get rid of it by deleting my old Maven settings file. Then I updated the Maven plugins manually using the mvn command:

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

Finally I ran the "Reimport All Maven Projects" button in the Maven Project tab in IntelliJ. The errors vanished in my case.

查看更多
唯我独甜
3楼-- · 2020-02-07 18:29

Goto IntelliJ -> Preferences -> Plugin

Search for maven, you will see 1. Maven Integration 2. Maven Integration Extension.

Select the Maven Integration option and restart your Intellij

查看更多
登录 后发表回答