lenmom

博客园 首页 新随笔 联系 订阅 管理

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

posted on 2019-12-06 14:53  老董  阅读(651)  评论(0编辑  收藏  举报