1. using argument parameter --settings / or -s for shot
mvn install --settings c:\user\settings.xml #mvn install -s c:\user\settings.xml mvn clean package --settings F:\Maven\settings.xml -Dmaven.test.skip=true #mvn clean package -s F:\Maven\settings.xml -Dmaven.test.skip=true
2. watch current maven setting info
mvn help:effective-settings
mvn help:system can print all java system properties and os env variables.
mvn help:effective-pom用于查看当前生效的POM内容,指合并了所有父POM(包括Super POM)后的XML,所以可用于检测POM中某个配置是否生效
mvn effective-settings可用于查看当前生效的settings.xml文件内容,所以可用于判断某个settings配置是否生效
3. reference
http://stackoverflow.com/questions/1261215/maven-command-to-determine-which-settings-xml-file-maven-is-using
http://stackoverflow.com/questions/25277866/maven-command-line-how-to-point-to-a-specific-settings-xml-for-a-single-command