Caused org apache maven wagon TransferFailedException
If you are getting below exception while trying to run mvn command from window command prompt:
There could be two reason:
- If you are working in home where don’t have firewall: First see which setting.xml file window is using and to see this execute below command:
- As you see above reading global setting from C:\JavaHonk\Maven\apache-maven-3.2.5\conf\settings.xml and user setting from: C:\Users\JavaHonk\.m2\settings.xml. First open global setting.xml file and check if any proxy is enable in my with some dummy name through which maven was trying to connect and failing as below:
- I comment them out because its home network and we don’t use proxy as below:
- It started working.
- Almost all companies use proxy server to filter inbound and outbound traffic. You are getting exception because your proxy settings are not correct. Find proxy setting of your company using this tutorial
- Now go to setting.xml file and add you proxy setting:
- Now delete your local repository. It should work please follow this tutorial if above solution doesn’t work.