Skip to content

Instantly share code, notes, and snippets.

@kdevo
Last active March 1, 2024 09:03
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdevo/05542ea81905d12199019699962171de to your computer and use it in GitHub Desktop.
Save kdevo/05542ea81905d12199019699962171de to your computer and use it in GitHub Desktop.
IntelliJ IDEA and Maven - "Unresolved Plugin" notes

IntelliJ IDEA and Maven - "Unresolved Plugin" Solutions

⚠️ Probably outdated (from 2016).

Related:

Symptoms

  1. After adding a plugin or a dependency to pom.xml and auto-importing changes or importing changes manually, the plugin or dependency is still not resolved/downloaded
  • Check via CTRL+SHIFT+A -> Enter "Maven Projects" (you would a red underlined plugin or dependency)
  1. "Cannot reconnect" to remote Maven central repository
  • Check via CTRL+SHIFT+A -> Enter "Maven Settings" > Repositories (you would see a red entry)

Causes (only assumptions)

  • Corrupted download: background process has been interrupted/aborted...
    1. due to a network problem
    2. (un)intentionally by the user
  • After downloading the archive, while extracting the archive, IntelliJ aborts the process because of too low disk space
  • Simultaneous downloads from the Maven repository (?)

Solutions - tested on Linux

Before you try any of these solutions, save your work, clear IntelliJ's cache via File > "Invalidate Cache / Restart" and check if the problem persists.

Please also try if a simple "Reimport All Maven Projects" (type as action using CTRL+SHIFT+A) changes anything.

1. Solution - "Unresolved plugin"

If you have multiple unresolved plugins, it's maybe less work for you to follow the second solution instead to redownload all plugins at once.

Let's assume the plugin's full name which causes the problem is: org.apache.maven.plugins:maven-shade-plugin:2.4.3:shade (replace with your plugin's name)


  • Close IntelliJ
  • Get the path of your plugin. The path of the example plugin would be org/apache/maven/plugins/maven-shade-plugin (substitute '.' and ':' with '/')
  • Navigate to the affected plugin directory and delete it:
cd ~/.m2/repository/org/apache/maven/plugins/maven-shade-plugin
ls -a # should show a directory named after your plugin's version number
mv 2.4.3 2.4.3_old
  • Start IntelliJ again
  • CTRL+SHIFT+A -> Enter "Reimport All Maven Projects"
  • If the problem still persists, try the second solution below

2. Solution - "Cannot reconnect" to Maven repository

  • Make sure that you have enough disk space (especially when using a VM)
  • Try to update the repository CTRL+SHIFT+A -> Enter "Maven Settings" > Repositories -> select the red entry and click "Update"
  • Wait and drink ☕. This possibly takes a long time depending on your system, especially after the download has finished. The progress bar stands still but package extraction is in progress, please be patient.
  • If IntelliJ fails and the problem still persists: close IntelliJ, then:
cd ~/.m2
mv repository repository_old
  • Update as descibed in 2.
@PWAlessi
Copy link

In 2018.1.2, I'm getting unresolved plugin for plugins that I've never used (maven-site). Just using the plugin once resolved the issue.

@lequeso
Copy link

lequeso commented Jun 5, 2018

Confirming that, Just using the plugin(s) once resolved the issue.

@andrewfinnell
Copy link

Neither of these solutions solves the Maven Plugins showing as Red for me.. Anyone have success with other avenues to fix this?

@JosehGaks
Copy link

solution 1 worked for me.

@udayaramanary
Copy link

solution 1 worked for me

@Xu-Justin
Copy link

Solution 1 worked for me. Thank you!

@Mon-ange
Copy link

Thanks! I never can breath without your solution 1! My God! Take my love!

@dev-soragoto
Copy link

dev-soragoto commented Feb 23, 2023

Solution 1 worked for me at 2023.2.23 in IDEA 2022.3.2, thanks!

@umar7860
Copy link

Solution 1 worked for me
12/10/2023

@Linranran
Copy link

mark

@1WorldCapture
Copy link

solution 1 works for me +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment