Maven plugins can not be found in IntelliJ

前端 未结 30 1080
暗喜
暗喜 2020-12-04 10:09

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


        
相关标签:
30条回答
  • 2020-12-04 10:27

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

    0 讨论(0)
  • 2020-12-04 10:28

    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 讨论(0)
  • 2020-12-04 10:30

    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>
    
    0 讨论(0)
  • 2020-12-04 10:30

    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>
    
    0 讨论(0)
  • 2020-12-04 10:30

    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

    0 讨论(0)
  • 2020-12-04 10:31

    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.
    0 讨论(0)
提交回复
热议问题