Maven plugins can not be found in IntelliJ

前端 未结 30 1079
暗喜
暗喜 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:38

    For newer versions of IntelliJ, enable the use plugin registry option within the Maven settings as follows:

    1. Click File
    0 讨论(0)
  • 2020-12-04 10:40

    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.

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

    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.

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

    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.

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

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

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

    0 讨论(0)
提交回复
热议问题