Maven: Failed to retrieve plugin descriptor error

前端 未结 15 1717
粉色の甜心
粉色の甜心 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-29 00:09

    I had the same problem because I was using port 80 instead of 8080 in the settings.xml proxy configuration

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

    If you created new settings.xml file instead of copy it from somewhere else, remember to put the tag inside :

    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <proxies> ..... </proxies> </settings>

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

    In my case, it was not worknig even after passing the proxy credentails.

    Mistake was - forgot to remove the comment line.

    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
    
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>345325</username>
      <password>dfgasdfg</password>
      <host>proxy.abc.com</host>
      <port>8080</port>
      <nonProxyHosts>proxy.abc.com</nonProxyHosts>
    </proxy>
    |-->    ----------REMOVE THIS LINE AND CLOSE It above <proxy> tag
    
    0 讨论(0)
  • 2020-11-29 00:12

    In my case, even my system is not behind proxy, I got same issue. I was able to resolve by typing mvn help:archetype before mvn archetype:generate

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

    I have to put

     <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>Your proxy host</host>
      <port>proxy host ip</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    

    Before

     <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>https</protocol>
      <host>Your proxy host</host>
      <port>proxy host ip</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    

    Weird, but yes!, <protocol>http</protocol> has to come before <protocol>https</protocol>. It solved my problem. Hope it helps someone who faces connections issue even after enabling proxy settings in conf/settings.xml.

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

    I was having exactly the same problem.I went to my IE setting->LAN Settings.Then copied the Address as host and port as the port and it worked. Following is the snapshot of the proxies tag in the Settings.xml that I changed.

    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <!--username>proxyuser</username>
      <password>proxypass</password-->
      <host>webtitan</host>
      <port>8881</port>
      <!--nonProxyHosts>local.net|some.host.com</nonProxyHosts-->
    </proxy>
    

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