How do I invoke two different profiles in one maven command?

后端 未结 4 2187
孤城傲影
孤城傲影 2020-12-14 05:11

I have two profiles for different environments in pom.xml, I have to run mvn -PTest1 install and mvn -PTest2 install command to get th

4条回答
  •  情书的邮戳
    2020-12-14 06:10

    Mifeet's answer is correct, but in Windows PowerShell you should quote parameters, otherwise you'll get "unknown lifecycle phase" error.

    mvn install -P 'Test1,Test2'
    

提交回复
热议问题