Org apache maven plugins ошибка

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

asked Dec 10, 2013 at 13:47

Spring's user avatar

SpringSpring

11.4k29 gold badges115 silver badges185 bronze badges

4

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.

Dave Jarvis's user avatar

Dave Jarvis

30.3k40 gold badges178 silver badges315 bronze badges

answered Nov 27, 2014 at 10:49

GarfieldKlon's user avatar

GarfieldKlonGarfieldKlon

11k6 gold badges31 silver badges32 bronze badges

12

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.

anothernode's user avatar

anothernode

5,03913 gold badges43 silver badges60 bronze badges

answered Jul 3, 2017 at 11:00

Steven Spungin's user avatar

Steven SpunginSteven Spungin

26.5k5 gold badges83 silver badges75 bronze badges

11

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.

answered Dec 10, 2013 at 16:16

Javaru's user avatar

JavaruJavaru

30.2k11 gold badges93 silver badges70 bronze badges

4

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.

Logan Farci's user avatar

answered Oct 28, 2016 at 15:39

Eng.Fouad's user avatar

Eng.FouadEng.Fouad

115k70 gold badges312 silver badges416 bronze badges

7

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

answered Sep 25, 2017 at 15:56

Wendel's user avatar

WendelWendel

2,75927 silver badges28 bronze badges

3

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.

answered Sep 20, 2019 at 7:14

Randhir Ray's user avatar

Randhir RayRandhir Ray

5405 silver badges14 bronze badges

6

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>

answered Feb 9, 2017 at 5:06

olivejp's user avatar

olivejpolivejp

9001 gold badge9 silver badges14 bronze badges

2

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.

answered Aug 29, 2020 at 18:27

Johannes's user avatar

JohannesJohannes

82811 silver badges29 bronze badges

2

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…

answered Nov 14, 2018 at 10:04

Nils's user avatar

NilsNils

4763 silver badges4 bronze badges

4

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.

answered Mar 12, 2014 at 10:14

Björn Jacobs's user avatar

Björn JacobsBjörn Jacobs

4,0234 gold badges28 silver badges47 bronze badges

None of the other solutions worked for me.

My solution:

Maven Settings -> Repositories -> select Local Repository in the list, Update

Worked like a charm!

cigien's user avatar

cigien

57.6k11 gold badges72 silver badges111 bronze badges

answered Dec 26, 2021 at 14:24

Tamás Bárász's user avatar

1

This did the trick for me…delete all folders and files under ‘C:Users[Windows User Account].m2repository’.

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

answered Aug 28, 2014 at 3:03

Brandon Oakley's user avatar

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

DependencyHell's user avatar

answered Jul 12, 2018 at 1:13

Xin Cai's user avatar

Xin CaiXin Cai

1413 silver badges5 bronze badges

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>

answered Aug 21, 2020 at 9:22

CodeMonkey123's user avatar

1

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.

answered Mar 9, 2017 at 11:51

Denham Coote's user avatar

1

If an artifact is not resolvable.
Go in the directory 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 delete it, and try again to re-import in IntelliJ.

the content of those files is like :

#NOTE: This is an Another 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 enabled to reload what is missing.

Spring's user avatar

Spring

11.4k29 gold badges115 silver badges185 bronze badges

answered Apr 27, 2017 at 17:11

Gauthier Peel's user avatar

Gauthier PeelGauthier Peel

1,4082 gold badges17 silver badges35 bronze badges

2

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

answered May 4, 2015 at 13:40

MathiasJ's user avatar

MathiasJMathiasJ

1,6611 gold badge14 silver badges20 bronze badges

0

Uncheck the «Work offline» checkbox in Maven settings.

answered Nov 4, 2015 at 6:48

Maheshkumar's user avatar

MaheshkumarMaheshkumar

7341 gold badge10 silver badges19 bronze badges

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.

answered Aug 7, 2019 at 14:06

SureshAtt's user avatar

SureshAttSureshAtt

1,8912 gold badges17 silver badges22 bronze badges

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>

answered Feb 26, 2020 at 13:00

Nipuna Saranga's user avatar

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…

answered Jul 18, 2020 at 5:20

Krishan's user avatar

KrishanKrishan

3631 silver badge12 bronze badges

3

This worked for me

  1. Go to Settings —> Maven —> Importing —> JDK for importer —>
    use «Use Project JDK» option instead of a custom JDK set previously.
  2. Re-build/re-import all the dependencies.

answered Mar 31, 2021 at 3:04

mohit jain's user avatar

0

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.

answered Jan 24, 2019 at 9:16

Abhishek Gupta's user avatar

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.

answered Oct 19, 2020 at 16:14

Dmitriy Popov's user avatar

Dmitriy PopovDmitriy Popov

2,0922 gold badges21 silver badges30 bronze badges

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.

answered Nov 7, 2020 at 17:50

Roman Egorov's user avatar

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

answered Oct 2, 2014 at 17:47

satoukum's user avatar

satoukumsatoukum

1,1281 gold badge21 silver badges30 bronze badges

  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

answered May 27, 2020 at 6:34

Sheersha Jain's user avatar

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.

answered May 29, 2021 at 21:54

Antonio Petricca's user avatar

Antonio PetriccaAntonio Petricca

8,7485 gold badges34 silver badges71 bronze badges

June/2021:

No Delete, No Reimport.

What I did is, I was going to :

C:Usersdell.m2repositoryorgapachemavenplugins

Then double Click on every Plugin Folders, And see what version it is downloaded.

Then I came back to pom file, and according to downloaded version, I carefully changes those versions in <version>....</version> Tags. Then refresh.

And That way, All red marks are gone, Even gone those Yellow Marks.

All Clean.

Here is my full pom file for further notice. The Project is JavaFx+Maven with Shade :

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>main.java.sample</groupId>
    <artifactId>ThreeColumnTable</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>15.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>15.0.1</version>
        </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>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <release>11</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>resources</goal>
                            <goal>testResources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.1.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>src/main/generated-groovy-stubs</directory>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>org.example.App</mainClass>
                            <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>0.0.1</version>
                <configuration>
                    <mainClass>org.example.App</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>project-classifier</shadedClassifierName>
                            <transformers>
                                <transformer implementation=
                                                     "org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>org.example.Main</mainClass>
                                </transformer>
                            </transformers>

                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Akshay Hazari's user avatar

answered Jun 26, 2021 at 18:32

Noor Hossain's user avatar

Noor HossainNoor Hossain

1,6201 gold badge18 silver badges24 bronze badges

2

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

answered Sep 21, 2016 at 8:58

Anil's user avatar

AnilAnil

5951 gold badge5 silver badges14 bronze badges

Problem Description:

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

Solution – 1

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 – 2

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.

Solution – 3

This did the trick for me…delete all folders and files under ‘C:Users[Windows User Account].m2repository’.

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

Solution – 4

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

Solution – 5

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 – 6

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

Solution – 7

Uncheck the “Work offline” checkbox in Maven settings.

Solution – 8

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

Solution – 9

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

Solution – 10

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.

Solution – 11

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>

Solution – 12

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.

Solution – 13

If an artifact is not resolvable.
Go in the directory 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 delete it, and try again to re-import in IntelliJ.

the content of those files is like :

#NOTE: This is an Another 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 enabled to reload what is missing.

Solution – 14

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.

Solution – 15

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!

Solution – 16

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

Solution – 17

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

Solution – 18

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

Solution – 19

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…

Solution – 20

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.

Solution – 21

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.

Solution – 22

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.

Solution – 23

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>

Solution – 24

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.

Solution – 25

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.

Solution – 26

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.

Solution – 27

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} .m2repositoryorgapachemavenpluginsmaven-site-plugin {VERSION}

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

Solution – 28

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>

Solution – 29

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>

Solution – 30

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.

Solution – 31

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

Solution – 32

  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

Solution – 33

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…

Solution – 34

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!

Solution – 35

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>

Solution – 36

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.

Solution – 37

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>

Solution – 38

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.

Solution – 39

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!

Solution – 40

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.

Solution – 41

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

Solution – 42

This worked for me

  1. Go to Settings –> Maven –> Importing –> JDK for importer –>
    use «Use Project JDK» option instead of a custom JDK set previously.
  2. Re-build/re-import all the dependencies.

Solution – 43

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.

Solution – 44

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.

Solution – 45

June/2021:

No Delete, No Reimport.

What I did is, I was going to :

C:Usersdell.m2repositoryorgapachemavenplugins

Then double Click on every Plugin Folders, And see what version it is downloaded.

Then I came back to pom file, and according to downloaded version, I carefully changes those versions in <version>....</version> Tags. Then refresh.

And That way, All red marks are gone, Even gone those Yellow Marks.

All Clean.

Here is my full pom file for further notice. The Project is JavaFx+Maven with Shade :

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>main.java.sample</groupId>
    <artifactId>ThreeColumnTable</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>15.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>15.0.1</version>
        </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>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <release>11</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>resources</goal>
                            <goal>testResources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.1.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>src/main/generated-groovy-stubs</directory>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>org.example.App</mainClass>
                            <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>0.0.1</version>
                <configuration>
                    <mainClass>org.example.App</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>project-classifier</shadedClassifierName>
                            <transformers>
                                <transformer implementation=
                                                     "org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>org.example.Main</mainClass>
                                </transformer>
                            </transformers>

                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Solution – 46

None of the other solutions worked for me.

My solution:

Maven Settings -> Repositories -> select Local Repository in the list, Update

Worked like a charm!

Solution – 47

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>

Solution – 48

Deleted all folders from below and did the «Reload All Maven Projects» refresh button and it worked for me.

C:Users<username>.m2repositoryorgapachemavenplugins

Solution – 49

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.

IntelliJ IDEA and Maven — «Unresolved Plugin» Solutions

⚠️ Probably outdated (from 2016).

Related:

  • https://intellij-support.jetbrains.com/hc/en-us/community/posts/206434489
  • https://youtrack.jetbrains.com/issue/IDEA-127515

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.

This error occurs when you employ a plugin that Maven could not download. Possible causes for this error are:

  1. You are referring to a non-existing plugin, e.g. by means of a typo in its group id, artifact id or version.
  2. You are using a third-party Maven plugin that is not deployed to the central Maven repository and your POM/settings is missing the required <pluginRepository> to download the plugin. Note that <repository> declarations are not considered when looking for the plugin and its dependencies, only <pluginRepositories> are searched for plugins.
  3. The plugin repository you have configured requires authentication and Maven failed to provide the correct credentials to the server. In this case, make sure your ${user.home}/.m2/settings.xml contains a <server> declaration whose <id> matches the <id> of the plugin repository to use. See the Maven Settings Reference for more details.
  4. There is a general network problem that prevents Maven from accessing any remote repository, e.g. a missing proxy configuration.
  5. Maven failed to save the files to your local repository, see LocalRepositoryNotAccessibleException for more details.
  6. The plugin repository you have configured is disabled for the specific version of the plugin you requested. For instance, if you want to use a SNAPSHOT version of a plugin, make sure you don’t have <snapshots><enabled>false</enabled></snapshots> configured. Likewise, in order to resolve a released version of the plugin, the plugin repository should not be configured with <releases><enabled>false</enabled></releases>. See the POM Reference for more information on repository configuration.

In those cases, check your POM and/or settings for the proper contents. If you configured the plugin repository in a profile of your settings.xml, also verify that this profile gets actually activated, e.g. via invoking mvn help:active-profiles.

In case of a general network-related problem, you could also consult the following articles:

  • Configuring a Proxy
  • Security and Deployment Settings
  • Guide to Remote Repository Access through Authenticated HTTPS

Note: For performance reasons, Maven caches the information that the plugin could not be downloaded. Depending on your setup, you might need to clear this cache by adding the flag -U to the command line for your corrections to take effect.

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.

Solution 4

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.

Solution 5

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

Related videos on Youtube

BUILD FAILURE Plugin org.apache.maven.plugins: or one of its dependencies could not be resolved..

04 : 52

BUILD FAILURE Plugin org.apache.maven.plugins: or one of its dependencies could not be resolved..

How to Identify Maven Dependency Issues | Maven Helper | IntelliJ | Tech Primers

05 : 40

How to Identify Maven Dependency Issues | Maven Helper | IntelliJ | Tech Primers

Working With Maven in IntelliJ IDEA

05 : 40

Working With Maven in IntelliJ IDEA

IntelliJ IDEA by JetBrains

Maven Complete Tutorial with IntelliJ

38 : 17

Maven Complete Tutorial with IntelliJ

How to add Maven to Java project in IntelliJ IDEA

06 : 32

How to add Maven to Java project in IntelliJ IDEA

Project '...-parent' not found; IntelliJ IDEA Maven parent POM false error & solution - Spring Boot

02 : 02

Project ‘…-parent’ not found; IntelliJ IDEA Maven parent POM false error & solution — Spring Boot

[Resolved]Maven Compiler Issues

22 : 35

[Resolved]Maven Compiler Issues

Comments

  • 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

    • Press Ctrl + Alt + S.Go to plugins. Is «Maven integration» checked?

    • @memainjm yes it is checked

    • Uncheck the «Work offline» checkbox in Maven settings.

    • why not accept the first answer? IT seems to work

  • For my colleague, force re-import worked when plugins had not been shown in the right maven panel.

  • Nice. I had a few of these due to IntelliJ battling my company’s proxy server. Finally blew them out. Thanks!

  • Seems like intellij didnt auto download these plugins without actually runing the maven goal. Kind of makes sense:-) Worked for me even if the actual site and deploy goals did fail :-)

  • This downloaded all my missing maven plugins. Thanks for the tip.

  • Thanks for the tip! Did the above, then deleted the problematic plugin directories, then Reimport and voila!

  • it worked for me. It seems it was using an outdated settings.xml

  • «update maven indices» (under ctrl + enter) after that

  • I didn’t have the issue of the local repository being corrupted. But adding the version did it.

  • This worked for me. I also did the comment given by @Vlad. Upvoted both answer and comment. Intellij Version 2019.2 installed after formatting the machine.

  • So even after I deleted .m2repository, I was finding that my .m2repositorycomwhateverthingmy-plugin1.2.3 was only «partially’ being populated. I deleted the 1.2.3 directory and did what you say here, and then it looked correct populated. I think this is the «nail» solution vs the hammer solution of deleting .m2repository thanks.

  • I tried everything else in this thread, only this one resolved the issue in my case.

  • Worked for me. Thanks. Could you please explain what it actually does?

  • @NIKHILCHAURASIA The Maven Clean Plugin, attempts to clean the files and directories generated by Maven during its build. While there are plugins that generate additional files, the Clean Plugin assumes that these files are generated inside the target directory. When considering about maven-deploy-plugin deploying means not only copying the artifacts but making sure all this information is correctly updated. But if these files override with cashed files, it may course errors

  • @NIKHILCHAURASIA When executing Maven, it’ll first look in this local cache for artifacts. If the artifact cannot be found here, Maven will access the remote repositories to find the artifact. Once found it will be stored into the local repository, so it’s available for current and future usage.

  • Where is that directory?

  • And on Windows 10 that directory is here: «C:Usersyour_user.m2repositoryorgapachemavenplugins‌​maven-site-plugin». I had only 1 file inside another directory there. I removed folder, IntelliJ redownloaded it, but then there were couple files, including .jar. Before that I had 2 to 5 errors in IntelliJ, after that I have only 1. The same as before with that folder.

  • Found it (Windows 10): «C:Usersyour_user.m2repositoryorgapachemavenplugins‌​maven-site-plugin». I had only 1 file inside another directory there. I removed folder, IntelliJ redownloaded it, but then there were couple files, including .jar. Before that I had 2 to 5 errors in IntelliJ, after that I have only 1. The same as before with that folder.

  • For Mac users, you can find it under Preferences. (Click on IntelliJ IDEA on the menu bar-> Preferences) or (Command⌘+,) ->(Same as above)Build, Execution, Deployment -> Build Tools -> Maven.

  • I think that this should be the right answer, probably it’s the main cause when plugins are not found. Apparently plugin dependencies are not downloaded until the associated profile is enabled (I looked into the maven repository and plugins marked in red where missing). I would try this before to delete the whole m2 repository (it can take some time to re-download).

  • It’s worth mentioning that I tried all the ‘above’ answers before finally caving and adding the declaration directly in my projects pom.xml This is a less-than-optimal solution because we have to add the maven plugins to each new project. Edit: I took this one step further and now REMOVED the declaration. Now the inspection error is gone…

  • I’m using version 20.x.x. This didn’t work for me. Could it be another problem?

  • How do you do a force reimport in IntelliJ?

  • @a-p From the Maven tool window, click the «Reload all Maven Projects» button (it’s the left most button and looks like two arrows in a circle, much like most refresh icons.) It use to be labeled «Re-import…» rather than «Reload…», hence why in my above answer I said «re-import». They changed the nomenclature used a few years ago.

  • This is exactly what worked for me. What remains unexplained, however, is what is the cause of this bizarre behaviour, especially considering that org.apache.maven.plugins is the default value of groupId?

  • @manikanta nvsr:Could you check that 1) that ‘Use plugin registry’ is activated? 2) Within your Maven local repo that the dep is there but not really downloaded? In this case remove the directory and synch again (button on the right). It solved the problem for me.

  • Helped me. I added the repository once, removed it and then it works well.

  • using Invalidate and Restart, works for me. Am using IntellIj 2020.03.

  • 4th one is an effective solution.. I think deleting repo finally works in any maven conflict case :)

  • Thanks a lot. This worked for me after struggling for 1 day.

  • Thx! this finally did the trick for me so you guys could try to cd ~/.m2/repository && find . -type f -name ‘*lastUpdated’ | xargs rm

  • Before the version you must force to download the correct version. Then it perfectly run.

  • Does anyone know why this isn’t a default in Intellij? This should be enabled by default.

  • To update the cacerts file did it for me (using an own nexus with own SSL certificate). The cacerts file has a default password of «changeit». intellij-support.jetbrains.com/hc/en-us/community/posts/…. You import the own crt file with: keytool.exe -import -alias mynexus -keystore <path to file>cacerts -file <path to file>dataic.crt

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

  • I was also wondering why they haven’t enabled it by default.

  • Replying to @fan: «I didn’t have the issue of the local repository being corrupted» — it doesn’t need to be corrupted, just if there is a newer version, the old one can’t be override and that’s the reason it’s not updated.

  • But why does it happen? What’s the reason, shouldn’t the plugins only be downloaded in the respected versions?

  • I tried many solutions and this was the only one that worked for me. Thanks!

  • Generally people don’t provide version and may be defaulted version is not the one that is existing. Another reason is wrong plugin version mentioned in the pom so that will not be found either. The key @Noor Hossain has mentioned is provide the right version and it should work.

  • Not solving the issue

  • In short, delete the folder for the offending dependency from inside repository (.m2/repository/path/to/offending/dependency)

  • This also worked for me, thanks.

  • This issues fixed it for me. For me it was org/apache/maven/plugins/maven-jar-plugin

  • This one worked for me loading a project that was built using an older version of IntelliJ. Thanks a bunch!

  • @Marchyello the most likely reason is the bug in IntelliJ maven plugin. It just expects that each plugin has a groupId, when it is completly fine to omit one for maven own plugins.

  • did not solve the issue for me in 2022.1

  • 2 years later, and your answer still useful, Thank you so much, I have been looking for a solution for the last 2 days.

  • Same for the clean, compile, install, but NOT deploy lifecycles, for which I get the following error Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter

  • Thank you. I had (and hated) that problem for months..

  • Thank you! It worked for Community 2021.3.2

  • In my case, I had to update the cloud maven repository index as well in the same page. On my mac the navigation was: Preferences > Maven > Repositories > select required Repository > click on Update > Apply.

  • Deleting folders of missing plugins is the only solution that worked for me.

Recents

Возможно, вам также будет интересно:

  • Ore варочная панель ошибка el
  • Ordinal not in range 128 ошибка
  • Ordersend error 4107 таблица ошибок
  • Ordersend error 131 ошибка
  • Orderselect вернул ошибку 4051

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии