344

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.

EDIT after 8 years: Please also have a look at all other good answers here. The accepted answer is a common solution but might not work for you or for your IDE version

4
  • 8
    Press Ctrl + Alt + S.Go to plugins. Is "Maven integration" checked?
    – memainjm
    Dec 10, 2013 at 14:02
  • @memainjm yes it is checked
    – Spring
    Dec 10, 2013 at 14:48
  • 4
    Uncheck the "Work offline" checkbox in Maven settings. Nov 4, 2015 at 6:48
  • I have found that during Idea updated, the idea Program-Files folder has changed. Idea in settings has the location of maven plugin, which was incorrect (pointing to the old folder). - File->Settings->Build,Exec...->Build Tools->Maven
    – Engin
    Nov 15, 2023 at 12:56

57 Answers 57

1
2
2

I use the community edition packaged as snap on Ubuntu 18.04.

I experience that issue each time there a IntelliJ release.

In that scenario, my working solution is to invoke the invalidate cache and restart from the file menù flagging the indexes removal too.

1

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

1

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.
1

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.

1

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!

1

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>
1
  • This solved it for me as well. Needed to specify the groupId and the version.
    – TJA
    Mar 7, 2023 at 19:07
1

If you already tried to clear your .m2 folder, used "Invalidate Caches" and "Restart, double-checked the plugin declarations in your POM file, then:

1. Check the IntelliJ Maven configuration

  • Ctrl+Shift+A
  • Type "Maven Settings"
  • Tick "Use plugin registry"
  • Double-check your "Maven home path" and "User settings file"
  • Try to get additional logs: set "Output level" to "Debug" and click "Apply"

2. Check the IntelliJ Java configuration

  • Ctrl+Shift+A
  • Type "Importing"
  • Double-check the JDK used in "JDK for importer"

3. Update your cacerts keystore file

Make sure you trust the TLS server certificate of the remote Maven repository. For that, add the public certificate(s) to the cacerts keystore under /path/to/jdk/jre/lib/security/ (for instance by using https://keystore-explorer.org/) - default password is "changeit"

If you can't edit the file:

  • Ctrl+Shift+A
  • Type "Importing"
  • Update "VM options for importer" with -Djavax.net.ssl.trustStore=/path/to/cacerts -Djavax.net.ssl.trustStorePassword=changeit and click "Apply"
1

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!!!

1
  • I've been trying several options but this is the one that worked for me. But maybe it's because another steps I made that affected too.
    – dmance
    May 31, 2021 at 9:39
1

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.

Also maven-surefire-report-plugin == LATEST and

<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>6.9.8</version>
</dependency>
0

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.)

0

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!

0

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

0

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.

0

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>
0

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!

0

None of these solutions worked for me. After a painful few hours, it turned out that the issue was caused by the way I imported the project.

Context: importing freshly generated Spring Initializr project with Web & Kafka dependencies.

Issue: plugin dependency was "Not found" and IntelliJ couldn't compile the app, even though mvn clean compile ran fine on the console.

The bad way: Importing it using the "New > Project from Existing Sources..." option.

The good way: Importing it using the "Open..." option.

Solution to go from the bad to the good: remove the project, delete and re-clone the repo from version control to make sure all gitignored IntelliJ files are removed, and import it into IntelliJ with the "Open..." option.

0

You must add the dependency

This question is old, but I hope my answer will help those who find it

Reference [link] https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-dependency-plugin/3.1.1

<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-dependency-plugin -->
<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>3.1.1</version>
</dependency>
0

I put the dependency in dependencies, and solved my problem:

<dependencies>
    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.0.0</version>
    </dependency>
</dependencies>

I neglected the <pluginManagement>, it's as <dependencyManagement> which is different from <dependencies>:

dependencyManagement only declares dependencies, it does not introduce them.

So whether I clean all items in my repository folder or type mvn clean install -e -U, both don't work.

0

I also had this error for a long time until this solution solved my problem:

Try deleting the maven-site-plugin directory from your local repository (located at ~/.m2/repository/org/apache/maven/plugins/maven-site-plugin) and running mvn clean install again.

1
0

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)

0

Another possible solution (which worked for me): as only IDEA fails, but Maven CLI works, the issue must be completely on the IDE side. To have an homogeneous behavior, go to

Build, Execution, Deployment → Built Tools → Maven

and set the Maven home path to the system installation (so to not use the bundled version).

enter image description here

0

In my case, for intelliJ 2023 for Mac, I had to add the dependency of each plugin that showed an error, for example for the plugin with artifactId: maven-compiler-plugin I had to add the dependency:

 <dependency>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-compiler-plugin</artifactId>
   <version>3.11.0</version>
 </dependency>

After that the errors disappeared.

0

Using the plugin registry, reloading all maven projects, or invalidating the caches and restarting did not resolve my issue. The IDE complained that the plugin could not be resolved. The important thing is to ensure that it is being executed in the correct order.

This is the steps to debug the issue:

  1. go to ~/.m2/repository/org/apache/maven/plugins and rm -rf all plugins that were not resolvable.
  2. Click on reload all maven projects. (now instead of saying the plugin is unresolvable, it will show an error log of some sort, in my case the proxy I was using could not be connected as it was an old proxy setting in settings.xml)
  3. I went to ~/.m2/settings.xml and changed the proxy to the correct one.
  4. invalidate caches and restart
  5. rm -rf all unresolvable plugins
  6. reload all maven projects
1
  • Duplicated comment with others Dec 7, 2023 at 16:26
0

What worked for me was to delete the following build plugin:

<plugins>
    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
    </plugin>
</plugins>

and I added the following taken from https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010178219-Cannot-resolve-plugin-org-apache-maven-plugins-

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.0.0-M1</version>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
            </plugin>

            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
0

I found the simple solution

Remove the plugins from your local repository under .m2 folder which displays the error like:

  • maven-install-plugin, and
  • maven-deploy-plugin

i.e.

rm -rf .m2/repository/org/apache/maven/plugins/maven-install-plugin
rm -rf .m2/repository/org/apache/maven/plugins/maven-deploy-plugin

And then add the plug-in in the pom.xml as given here:

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

Then rebuild your project. BOOM! it should work.

:)

0

I had this issue when I removed the dependencies for Postgress data base in Spring boot:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

what I did was click on file > invalidate caches > invalidate and Restart. Don't bother checking any of the option boxes before clicking on invalidate and Restart.

0

The error refers to plugins that do not exist, so just use the necessary plugins in the build:

<build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>plugin name expressed in the error</artifactId>
                    <version>version number</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 5 at 8:06
1
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.