http://maven.apache.org/guides/mini/guide-configuring-maven.html

and how to encrypt password in settings.xml: http://maven.apache.org/guides/mini/guide-encryption.html