Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

前端 未结 19 1942
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 05:09

I have install maven in my machine. I have properly set the class-path and maven home folder. Every time I execute mvn clean install, it gives me exception. I h

相关标签:
19条回答
  • 2020-11-30 05:31

    I have faced the same issue. I have changed the maven-assembly-plugin to 3.1.1 from 2.5.3 in POM.xml

    Proposed version should be done under plugin section. enter code here artifact Id for maven-assembly-plugin

    0 讨论(0)
  • 2020-11-30 05:31

    Just deleting repository folder in .m2 folder resolved the same issue.

    0 讨论(0)
  • 2020-11-30 05:31

    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

    0 讨论(0)
  • 2020-11-30 05:32

    I faced the same problem, even if I was working on my home wifi connection, without any proxy requirements.

    My project was created at c:\users\<>\Workspace\Project\

    When I went to above location and ran

    mvn clean install

    I got below error:

    [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its de
    endencies could not be resolved: Failed to read artifact descriptor for org.apa
    he.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.ap
    che.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.mave
    .apache.org/maven2)
    

    It took me entire day to try ways and means to crack this, but the solution in my case, was damn simple.

    I moved my project to non-user specific location, at E:\Workspace\Project\

    This has done wonders for me!

    0 讨论(0)
  • 2020-11-30 05:33

    The problem is probably that the JVM client doesn't trust the repo.maven.apache.org certificate. As suggested, you can try and access https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom in your browser.

    If that works - this is probably the case. You will have to explicitly tell the JMV to trust maven certificate. You can refer to the answer here "PKIX path building failed" and "unable to find valid certification path to requested target"

    for me on Mac OS, the certificate file is located at /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/lib/security and the certificate you need is the one presented to your browser when you enter the URL mentioned above

    0 讨论(0)
  • 2020-11-30 05:35

    It might be that you are forgetting to specify the settings which was the case with me.

    Try:

    mvn clean install -s settings_file.xml

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