Maven deploy works using plain text password, but fails if encrypted

If the Maven version being used is before 2.1.0 (or an early version of 3.0) it won't support encryption. Note that versions of M2E prior to 0.10 do not support encryption, nor does Netbeans prior to version 7.

Assuming you have a client that supports encryption, check the following:

  • See if the encrypted password for curly brace characters. If it contains any, you will need to escape them with "\".
  • Be sure to quote the password when encrypting it if it contains special characters such as $ which will be expanded by the shell. (single quotes on Linux will do the job, e.g. 'password', use double quotes on windows).
  • Finally, if you are using different authorizations for reading and deploying artifacts there is a bug where the lightweight http wagon sometimes caches credentials, and uses the wrong one during deployment. If deploying to Nexus, you can check the system feed "authorization and authentication events" to see if the wrong user ID is being sent. If this is the case, the workaround is to use the same credentials for both artifact retrieval and deployment.
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk