I configured Maven 3.0.3 and tried to download a sample project using archetypes with this command:
mvn archetype:generate -DarchetypeGroupId=org.graniteds.archetypes
-DarchetypeArtifactId=graniteds-tide-spring-jpa-hibernate
-DgroupId=org.example
-DartifactId=gdsspringflex
-Dversion=1.0-SNAPSHOT
(Command from 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 searching some posts similar to this but couldn't get an answer. I tried changing proxy settings in settings.xml but it still doesn't work. Could you please help me out?
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
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
D:\Maven\apache-maven-3.0.4-bin\apache-maven-3.0.4\conf
(ie your maven installation folder) settings.xml
and paste it in .m2
folder, which is in the users folder of your windows machine.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>
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
.
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.
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
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With