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

て烟熏妆下的殇ゞ 提交于 2019-11-30 07:49:08
Mifeet

Based on the documentation and discussion here, try separating profile names with a comma:

mvn install -P Test1,Test2

For me Mifeet's answer isn't working. I get "unknown lifecycle phase Test2". For me this is working:

mvn install -PTest1 -PTest2

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'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!