testing - What is the best way to get database password to integration tests using Maven? -


we using maven , spring , current execute our tests using system properties , test line.

mvn -ddbuser=username -ddbpassword=password test 

in past had utilized environment variables read support going away in maven figured may bad practice.

you store password property in settings.xml file. now, if storing in clear text bugs as me, there --encrypt-password option maven can store password in settings.xml encrypted in profile, server, or other section use in integration tests. here's link documentation on how configure this:

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


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -