Maven plugins can not be found in IntelliJ

Solution 1:

For newer versions of IntelliJ, enable the use plugin registry option within the Maven settings as follows:

  1. Click File 🡒 Settings.
  2. Expand Build, Execution, Deployment 🡒 Build Tools 🡒 Maven.
  3. Check Use plugin registry.
  4. Click OK or Apply.

For IntelliJ 14.0.1, open the preferences---not settings---to find the plugin registry option:

  1. Click File 🡒 Preferences.

Regardless of version, also invalidate the caches:

  1. Click File 🡒 Invalidate Caches / Restart.
  2. Click Invalidate and Restart.

When IntelliJ starts again the problem should be vanquished.

Solution 2:

Run a Force re-import from the maven tool window. If that does not work, Invalidate your caches (File > Invalidate caches) and restart. Wait for IDEA to re-index the project.

Solution 3:

I had this problem for years with the maven-deploy plugin, and the error showed up even though I was not directly including the plugin in my POM. As a work-around I had to force include the plugin with a version into my POMs plugin section just to remove the red-squiggly.

After trying every solution on Stack Overflow, I found the problem: Looking into my .m2/repository/org/apache/maven/plugins/maven-deploy-plugin directory there was a version 'X.Y' along with '2.8.2' et al. So I deleted the entire maven-deploy-plugin directory, and then re-imported my Maven project.

So it seems the issue is an IntelliJ bug in parsing the repository. I would not not remove the entire repository though, just the plugins that report an error.