Maven: failed to get plugin descriptor error

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

mvn archetype:generate -DarchetypeGroupId=org.graniteds.archetypes -DarchetypeArtifactId=graniteds-tide-spring-jpa-hibernate -DgroupId=org.example -DartifactId=gdsspringflex -Dversion=1.0-SNAPSHOT 

(The team at this link: http://java.dzone.com/articles/enterprise-ria-spring-3-flex-4 )

And I got this error:

 Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1 . . . Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml Downloading: repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (repo1.maven.org/maven2): Error transferring file: Connection refused: connect [WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (repo1.maven.org/maven2): Error transferring file: Connection refused: connect Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml Downloading: repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (repo1.maven.org/maven2): Error transferring file: Connection refused: connect [WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (repo1.maven.org/maven2): Error transferring file: Connection refused: connect [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.479s [INFO] Finished at: Tue Oct 18 12:44:58 BST 2011 [INFO] Final Memory: 1M/15M [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\krsl1254\.m2\repository), central (repo1.maven.org/maven2)] -> [Help 1] 

I tried to find similar posts similar to this, but could not get an answer. I tried changing the proxy settings in settings.xml, but it still does not work. Could you help me?

+54
maven
Oct 19 '11 at 9:26 a.m.
source share
15 answers

I had the same error. In my case, I am using Netbeans 7.1.2, I am posting this because maybe someone will be here just like me.

I tried to configure proxy settings from the GUI, but the documentation says that maven does not read them. So I checked the NetBeans FAQ here :

What you basically need to do is create (if it does not exist) the settings.xml parameter under

 user.home/.m2/settings.xml 

if you don’t have one, you can copy from

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

then uncomment if you already have this, otherwise fill out this section:

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

you need to check the proxy server configuration and replace it there

+59
May 11 '12 at 8:28 a.m.
source share

I had a similar problem with Eclipse and the same steps as Sanders. This is because the proxy restricts the call to the maven repository.

  • Go to D:\Maven\apache-maven-3.0.4-bin\apache-maven-3.0.4\conf (i.e. the maven installation folder)
  • Copy settings.xml and paste it into the .m2 folder located in the users folder of your Windows machine.
  • Add proxy settings

Something like that:

  <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> 
+30
Nov 20 '12 at 11:48
source share

I need 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> 

Strange, but yes. !!!, <protocol>http</protocol> should go to <protocol>https</protocol> . This solved my problem. Hope this helps someone who encounters connection problems even after including proxy settings in conf/settings.xml .

+5
28 Oct '15 at 11:42 on
source share

In my case, it did not work even after the proxy servers were transferred.

The error was - forgot to delete 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 
+3
Jun 18 '14 at 11:28
source share

I would not advise you to do this, but on my personal computer I turned off the firewall so that maven can get the necessary plugins.

+1
Jun 23 '13 at 0:14
source share

I had the same problem. I went to configure IE -> LAN Settings. Then I copied the address as the host and port as the port, and it worked. Below is a snapshot of the proxies tag in the Settings.xml file 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> 

+1
Sep 26 '13 at 6:35
source share

I had to change the password to the last in user.home / .m2 / settings.xml!

+1
Oct 21 '13 at 18:40
source share

Thanks for working ...

edit the .xml parameter

and replace the proxy with this

Works 100%

 <proxy> <active>true</active> <protocol>http</protocol> <username>your username</username> <password>password</password> <host>proxy.host.net</host> <port>80</port> 

+1
Nov 27 '13 at 9:46
source share

This problem will be resolved when changing the version of apache-maven

I ran into this and it was resolved when I used apache-maven-2.2.1

0
Apr 19 '13 at 12:18
source share

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

0
Jun 25 '13 at 14:07
source share

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

0
Jan 6 '14 at 1:26
source share

I had the same problem on Windows

and it worked with the changed proxy configuration in the settings.xml file

So, find and edit the file inside the \conf folder, for example: C:\Program Files\apache-maven-3.2.5\conf

 <proxies> <!-- proxy | Specification for one proxy, to be used in connecting to the network. | <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>jorgesys</username> <password>supercalifragilisticoespialidoso</password> <host>proxyjorgesys</host> <port>8080</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> --> </proxies> 
  • In my case, I had to iterate from port 80 to 8080
  • If you cannot edit this file located inside /program files , you can make a copy, edit the file and replace the file located in the /program files folder.
0
Jan 12 '15 at 20:57
source share

In my case, even my system is not behind the proxy server, I have the same problem. I was able to solve by typing mvn help: archetype before mvn archetype: generate

0
Jan 28 '15 at 3:00
source share

If you created a new settings.xml instead of copying it from another place, do not forget 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
Jun 09 '17 at 9:19 on
source share

Several times, if we delete the local repository folder and try mvn install again, this works. you can also try to delete the .m2 / maven home folder (i.e. the local repository of the hidden folder)

-four
Jul 26 '12 at 6:35
source share



All Articles