Caused org apache maven wagon TransferFailedException

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:

First 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:

Caused org apache maven wagon TransferFailedException

Caused org apache maven wagon TransferFailedException

  • 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:

Caused org apache maven wagon TransferFailedException

  • I comment them out because its home network and we don’t use proxy as below:

Caused org apache maven wagon TransferFailedException

  • It started working.

Second reason: 

  • 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:

Caused org apache maven wagon TransferFailedException

  • Now delete your local repository. It should work please follow this tutorial if above solution doesn’t work.

Leave a Reply

Your email address will not be published. Required fields are marked *