I configured Maven 3.0.3 and tried to download a sample project using archetypes with this command:
mvn archetype:generate -DarchetypeGroupId=org.graniteds.
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.
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 wouldn't advise you to do this but on my personal computer I disabled the firewall so that maven could get the required plugins.
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
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
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