How to pass Maven settings via environmental vars

后端 未结 3 1658
无人共我
无人共我 2020-12-29 23:18

In our setting.xml file we have the following:


    
      deploymentRepo
      repouser<         


        
3条回答
  •  醉酒成梦
    2020-12-30 00:21

    You can pass values from command line

    mvn -Dvar=someValue -Dtest.username=xyz install

    In the POM file, you can refer to system variables (specified on the command line, or in the pom) as ${var}, and environment variables as ${env.myVariable} i.e,${test.username}

    You can also refer to the sure-fire plugin doc

提交回复
热议问题