-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Windows Server 2022
Jenkins 2.486
Maven Integration plugin 3.24
We are in the process of migrating from our Artifactory with anonymous upload access to a Nexus server which needs credentials. We are using encrypted passwords as described here. However, when running a build through Jenkins the Post-Build action called "Deploy artifacts to Maven repository", it always fails due to:
authentication failed for https://nexusurl/, status: 401 Unauthorized
If I enter the password in clear text in the settings.xml file it works fine.
Originally I had the "Use private Maven repository" setting for the Build step set to "Local to the workspace" which made it unclear to me where to put the settings-security.xml file. But I have changed this now set to "Default ("~/.m2/repository", or the value of 'localRepository' in Maven's settings file, if defined". With the settings-security.xml file within that directory.
Running 'mvn deploy' on the relevant directory using the relevant user and being in the correct directory on that agent works fine. But building the job fails during the "Deploy artifacts to Maven repository" post-build action. I get the impression that that does not support the settings-security.xml file. Google didn't have much to say.