Maven: Failed to retrieve plugin descriptor error

前端 未结 15 1716
粉色の甜心
粉色の甜心 2020-11-28 23:23

I configured Maven 3.0.3 and tried to download a sample project using archetypes with this command:

mvn archetype:generate -DarchetypeGroupId=org.graniteds.         


        
相关标签:
15条回答
  • 2020-11-28 23:59

    Mac OSX 10.7.5: I tried setting my proxy in the settings.xml file (as mentioned by posters above) in the /conf directory and also in the ~/.m2 directory, but still I got this error. I downloaded the latest version of Maven (3.1.1), and set my PATH variable to reflect the latest install, and it worked for me right off the shelf without any error.

    0 讨论(0)
  • 2020-11-29 00:05

    I had a similar issue with Eclipse and the same steps as Sanders did solve it. It happens because the proxy restricts call to maven repository

    1. Go to D:\Maven\apache-maven-3.0.4-bin\apache-maven-3.0.4\conf (ie your maven installation folder)
    2. Copy settings.xml and paste it in .m2 folder, which is in the users folder of your windows machine.
    3. Add the proxy setting

    Something like this:

     <proxies>
        <!-- proxy
          Specification for one proxy, to be used in connecting to the network.
         -->
        <proxy>      
          <active>true</active>
          <protocol>http</protocol>
          <username>your username</username>
          <password>password</password>    
          <host>proxy.host.net</host>
          <port>80</port>  
        </proxy>
    
      </proxies>
    
    0 讨论(0)
  • 2020-11-29 00:05

    I wouldn't advise you to do this but on my personal computer I disabled the firewall so that maven could get the required plugins.

    0 讨论(0)
  • 2020-11-29 00:05

    For me, the solution given on the page maven is not able to download anything from central because ssl don't work worked, when running Mint 19 in a VM:

    sudo apt install ca-certificates-java
    sudo update-ca-certificates -f
    
    0 讨论(0)
  • 2020-11-29 00:07

    I had the same error. In my case I am using Netbeans 7.1.2, I am posting this because maybe someone end up here same as I did.

    I tried to configure the proxy options from the GUI, but the documentation says that maven doesn't read those. So I checked the NetBeans FAQ here :

    What mainly you have to do is create (if it does not exist) a settings.xml under

    user.home/.m2/settings.xml
    

    if you don't have it you can copy from

    netbeans.home/java/maven/conf/settings.xml
    

    then uncomment if you already have it otherwise just fill this section:

    <proxies>
     <proxy>
       <active>true</active>
       <host>myproxy.host.net</host>
       <port>80</port>
     </proxy>
    </proxies>
    

    you have to check your proxy configuration and replace it there

    0 讨论(0)
  • 2020-11-29 00:07

    This problem will solve when we change the version of apache-maven

    I faced it and it was solved when i used apache-maven-2.2.1

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