[java] Maven plugins can not be found in IntelliJ

After updating IntelliJ from version 12 to 13, the following Maven-related plugins cannot 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

When using IntelliJ 12, these were not in the plugins list. Somehow they've been added after the update and now IntelliJ complains they cannot 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 appear red with warnings in the IDE.

This question is related to java maven intellij-idea

The answer is


Enabling "use plugin registry" and Restart project after invalidate cash solved my problem

to Enabling "use plugin registry" >>> (intelij) File > Setting > Maven > enable the option from the option list of maven

To invalidate cash >>> file > invalidate cash

That's it...


I was recently faced with the same issue. None of the other solutions resolved the red error lines.

What I did was run the actual targets in question (deploy, site). I could see those dependencies then being fetched.

After that, a reimport did the trick.


In my case, there were two slightly different dependences (version 2.1 vs 2.0) in two maven sub-modules. After I switched to a single version the error has gone in IDEA 14. (Refresh and .m2 swipe didn't help.)


I experienced the same issue. What resolved it for me was simply uninstalling intelliJ and reinstalling it.


For me the Plugins were related to a Profile. I have to enable the relevant profile via Maven (right sidebar menu), Profiles and let the dependencies download.


this might help someone down the line

i faced similar issues, my system was not able to resolve the proxy server
so connected to the local wifi hotpsot.


This worked for me:

  • Close IDEA
  • Delete "*.iml" and ".idea" -directories(present in the root folder of project)
  • Run "mvn clean install" from the command-line
  • Re-import your project into IDEA

After re-importing the entire project, installation of dependencies will start which will take some minutes to complete depending upon your internet connection.


Here is what I tried to fix the issue and it worked:

  1. Manually deleted the existing plugin from the .m2 repo
  2. Enabled "use plugin registry" in IntelliJ
  3. Invalidated the cache and restarted IntelliJ
  4. Reimported the maven project in IntelliJ

After following above steps, the issue was fixed. Hopefully this helps you as well.


Uncheck the "Work offline" checkbox in Maven settings.


This did the trick for me...delete all folders and files under 'C:\Users[Windows User Account].m2\repository'.

Finally ran 'Reimport All Maven Projects' in the Maven Project tab in IntelliJ.


I had the same issue. I added the plugins into my pom.xml dependencies and it works for me.

    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.3</version>
        <type>maven-plugin</type>
    </dependency>

    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.4</version>
        <type>maven-plugin</type>
    </dependency>

    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.7</version>
        <type>maven-plugin</type>
    </dependency>

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.


  1. Check the plugins which cannot be found (maven-site-plugin,maven-resources-plugin)
  2. go to '.m2/repository/org/apache/maven/plugins/'
  3. delete the directory rm -rf plugin-directory-name (eg: rm -rf maven-site-plugin)
  4. exit project from intellij
  5. import project again
  6. Do a Maven reimport

Explanation: when you do a maven reimport, it will download all the missing plugins again.

Happy Coding


The red with warnings maven-site-plugin resolved after the build site Lifecycle:

enter image description here

My IntelliJ version is Community 2017.2.4


I could solve this problem by changing "Maven home directory" from "Bundled (Maven 3) to "/usr/local/Cellar/maven/3.2.5/libexec" in the maven settings of IntelliJ (14.1.2).


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.


In my case, I tried most of the answers above. I solve this problem by:

  • Cleaning all items in the .m2/repository folder
  • Uninstall Intellij Ultimate Version
  • Install Community Version

It so amazingly worked!


Remove your local Maven unknown plugin and reimport all maven projects. This will fix this issue.

You can find it under View > Tool Windows > Maven :

enter image description here


Recently I faced the same issue. All tips doesn't work in my cause.

But I fix it.

Go to Intellij idea setting, find Maven, and in it you need to open Repository tab and update maven and local repos. That's all.


I tried the other answers, but none of them solved this problem for me.

The problem disappeared when I explicitly added the groupId like this:

<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.1.0</version>
    </plugin>
</plugins>

Once the color of the version number changed from red to black and the problem disappeared from the Problems tab the groupId can be removed again from the problematic plugin, the error does not show up again and the version number even shows up as suggestion for version.


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.


For me, there was a mistake in the settings.xml. I was using http:// in the url due to which it wasn't working. Once i removed it the plugins were downloaded successfully.

<proxy>
   <id>optional</id>
   <active>true</active>
   <protocol>http</protocol>
   <host>www-proxy.xxxx.com</host>
   <port>80</port>
  <!-- <nonProxyHosts>local.net</nonProxyHosts>-->
  </proxy>

  <!-- Proxy for HTTPS -->
  <proxy>
   <id>optional1</id>
   <active>true</active>
   <protocol>https</protocol>
   <host>www-proxy.xxxx.com</host>
   <port>80</port>
   <!--<nonProxyHosts>local.net</nonProxyHosts>-->
  </proxy>

Tried invalidating cache, reimporting the project, removing .m2 folder partially and as a whole, and switching to the Idea bundled Maven. Nothing worked, and I've finally broken Maven completely: when it would build the project in the console, now it stopped. Had to reinstall Maven, and it helped!


None of the other answers worked for me. The solution that worked for me was to download the missing artifact manually via cmd:

mvn dependency:get -DrepoUrl=http://repo.maven.apache.org/maven2/ -Dartifact=ro.isdc.wro4j:wro4j-maven-plugin:1.8.0

After this change need to let know the Idea about new available artifacts. This can be done in "Settings > Maven > Repositories", select there your "Local" and simply click "Update".

Edit: the -DrepoUrl seems to be deprecated. -DremoteRepositories should be used instead. Source: Apache Maven Dependency Plugin – dependency:get.


SOLVED !!!

This is how I fixed the issue...

  1. Tried one of the answers which include 'could solve it by enabling "use plugin registry" '. Did enable that but no luck.
  2. Tried again one of the answers in the thread which says 'If that does not work, Invalidate your caches (File > Invalidate caches) and restart.' Did that but again no luck.

  3. Tried These options .. Go to Settings --> Maven --> Importing and made sure the following was selected

    Import Maven projects automatically

    Create IDEA modules for aggregator projects Keep source...

    Exclude build dir...

    Use Maven output...

    Generated souces folders: "detect automatically"

    Phase to be...: "process-resources"

    Automatically download: "sources" & "documentation"

    Use Maven3 to import

    project VM options for importer: -Xmx512m

    But again no success.

    1. Now lets say I had 10 such plugins which didn't get resolve and among them the first was 'org.apache.maven.plugins:maven-site-plugin' I went to '.m2/repository/org/apache/maven/plugins/' and deleted the directory 'maven-site-plugin' and did a maven reimport again. Guess what, particular missing plugin got dowloaded. And I just followed similar steps for other missing plugins and all got resolved.

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


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.


I just delete all my maven plugins stored in .m2\repository\org\apache\maven\plugins, and IntelliJ downloaded all the plugins again a it solve my problem and it worked fine for me!!!


For me it was as simple as giving the plugin a version:

<version>3.3.0</version>

The full plugin code sample is given below:

<build>
<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>3.3.0</version>
    <executions>
      <execution>
        <phase>package</phase>
        <goals>
          <goal>single</goal>
        </goals>
        <configuration>
          <archive>
            <manifest>
              <mainClass>Main</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
      </execution>
    </executions>
  </plugin>

You can add them as dependencies:

<dependencies>
    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.4.1</version>
    </dependency>
</dependencies>

Intellij will resolve them. After successfull import dependencies, you can clean them.


Try to put the following code in your pom.xml. If this does not work, try to change the <version>2.8.2</version> (diferent versions can be found in the maven repo.)

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

My solution was:

  1. Remove ${HOME}/m2/repository.
  2. Click on IntelliJ => Invalidate Caches / Restart.
  3. Refresh Maven Project.

If problem persist, you can add manually the missing plugins files.

For example if maven-site-plugins is missing, go to https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-site-plugin

Choice your version, and download files associated directly into your .m2 folder, in this example : C:\Users\ {USERNAME} .m2\repository\org\apache\maven\plugins\maven-site-plugin\ {VERSION}

In IntelliJ IDEA, open Maven sidebar, and reload (tooltip : Reimport All Maven projects)


For me, I download them manually and put theme in my .m2 folder then i did invalidate cache and restart (I m using Intellij IDEA). The steps are for example:

<groupId>org.codehaus.mojo</groupId>
              <artifactId>jdepend-maven-plugin</artifactId>
<version>2.0</version>
  1. I go to https://mvnrepository.com/ then serch for jdepend-maven-plugin choose the version 2.0
  2. In Files go and click on View All
  3. 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
  4. 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.

  5. create file with name _remote.repositories open it with text editor and write inside

jdepend-maven-plugin-2.0.jar>central=
jdepend-maven-plugin-2.0.pom>central=

  1. go to intellij IDEA invalidate cache and restart.

"IntelliJ IDEA and Maven - "Unresolved Plugin" Solutions" - in particular, deleting the plugin-folder - then reimporting all maven plugins after ide restart - worked for me.


I had the same problem, After checking the pom.xml file, found out that I have duplicated plugins for the surefire. After deleting and leaving only 1 inside the pom.xml - issue resolved.


If you have red squiggles underneath the project in the Maven plugin, try clicking the "Reimport All Maven Projects" button (looks like a refresh symbol).

Reimport all Maven Projects


I have change the Maven home directory from Bundled(Maven 3) to Bundled(Maven 2) in the maven setting. And this works for me. Have a try!


For me which worked is putting the repository which contained the plugin under pluginRepository tags. Example,

<pluginRepositories>
    <pluginRepository>
        <id>pcentral</id>
        <name>pcentral</name>
        <url>https://repo1.maven.org/maven2</url>
    </pluginRepository>
</pluginRepositories>

My case:

  • maven-javadoc-plugin with version 3.2.0 is displayed red in IntelliJ.
  • Plugin is present in my local maven repo.
  • Re-imported maven million times.
  • Ran mvn clean install from the command line N times.
  • All my maven settings in IntelliJ are correct.
  • Tried to switch between Bundled and non-bundled Maven.
  • Tried do delete the whole maven repo and to delete only the plugin from it.
  • Nothing of the above worked.
  • The only thing that almost always helps with modern IntelliJ IDEA versions is "Invalidate caches / Restart". It helped this time as well. maven-javadoc-plugin is not red anymore, and I can click on it and to to the source pom file of the plugin.

If an artefact is not resolvable Go in the ditectory of your .m2/repository and check that you DON'T have that kind of file :

build-helper-maven-plugin-1.10.pom.lastUpdated

If you don't have any artefact in the folder, just deleted it, and try again to re-import in IntelliJ.

the content of those file is like :

#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Fri Mar 10 10:36:12 CET 2017
@default-central-https\://repo.maven.apache.org/maven2/.lastUpdated=1489138572430
https\://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.codehaus.mojo\:build-helper-maven-plugin\:pom\:1.10 from/to central (https\://repo.maven.apache.org/maven2)\: connect timed out

Without the *.lastUpdated file, IntelliJ (or Eclipse by the way) is enable to reload what is missing.


I am using IntelliJ Ultimate 2018.2.6 and found out, that the feature Reimport All Maven Project does not use the JDK, which is set in the Settings: Build, Execution, Deployment | Build Tools | Maven | Runner. Instead it uses it's own JRE in IntelliJ_HOME/jre64/ by default. You can configure the JDK for the Importer in Build, Execution, Deployment | Build Tools | Maven | Importing.

In my specific problem, an SSL certificate was missing in the JREs keystore. Unfortunately IDEA only logs this issue in it's own logfile. A little red box to inform about the RuntimeException had been really nice...


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to maven

Maven dependencies are failing with a 501 error Why am I getting Unknown error in line 1 of pom.xml? Why am I getting "Received fatal alert: protocol_version" or "peer not authenticated" from Maven Central? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Unable to compile simple Java 10 / Java 11 project with Maven ERROR Source option 1.5 is no longer supported. Use 1.6 or later 'react-scripts' is not recognized as an internal or external command How to create a Java / Maven project that works in Visual Studio Code? "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository Java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException

Examples related to intellij-idea

IntelliJ: Error:java: error: release version 5 not supported Has been compiled by a more recent version of the Java Runtime (class file version 57.0) Error: Java: invalid target release: 11 - IntelliJ IDEA IntelliJ can't recognize JavaFX 11 with OpenJDK 11 Error: JavaFX runtime components are missing, and are required to run this application with JDK 11 ERROR Source option 1.5 is no longer supported. Use 1.6 or later Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 How to configure "Shorten command line" method for whole project in IntelliJ intellij idea - Error: java: invalid source release 1.9 Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle