Why am I getting a \"401 Unauthorized\" error in Maven?
Here\'s the error I\'m getting when calling mvn deploy (full logs at the bottom):
I got the same error when trying to deploy to a Artifactory repository, the following solved the issue for me:
Go to the repository setting in artifactory and enable the point "Force Maven Authentication" and the 401 "Unauthorized" error should be gone. (Of course you need to supply your credentials in the settings.xml file at best in plain text to prevent issues)
I guess by default, even through you supply the right credentials in the settings.xml file, they don't get used and you get the Unauthorized exception.