Maven: Generate different wars from different prof

2019-09-01 03:06发布

I have a web application project. This project has different maven profiles (for countries and environments) with filtered properties. I have to execute many times to obtain the different wars but I would like to get all the wars in a single maven execution.

Is this possible?

3条回答
霸刀☆藐视天下
2楼-- · 2019-09-01 03:23

It's not quite clear from your question, but if you simply want to "run" several profiles in one maven execution, it's as easy as

mvn -Pprofile1,profile2,... package

each with it's own WAR build execution.

Cheers,

查看更多
ゆ 、 Hurt°
3楼-- · 2019-09-01 03:25

If you need multiple wars, Place different POM's in all the directories you want and configure the basic information needed.

查看更多
霸刀☆藐视天下
4楼-- · 2019-09-01 03:26

Maybe you can write scipt with all those maven commands

查看更多
登录 后发表回答