views:

42

answers:

1

As I'm uncomfortable storing my username and password (must auth to the proxy server with my normal login credentials) in plaintext in .m2/settings.xml, I'm trying to see if there is a better way to pass my credentials.

What I've tried

  • Relying on system proxy settings - didn't work (obviously)
  • Leaving out password - downloaded 5k - 740b jars. Right...
  • Adding -Dmaven.proxy.password=mypass to command line - Same as above

is there anyway I can pass this information over command line? Or even better, is there a way to have it prompt me for the password?

FYI, it works as expected when I do have the password in the configuration file

+4  A: 

I have never used this particular feature of Maven, but they do have some support for encrypting passwords in your settings.xml. You can read more here: http://maven.apache.org/guides/mini/guide-encryption.html

That doesn't exactly answer your question, but it might solve your root problem.

Mike Deck
Got it to work, thanks!
TheLQ