Maven: Generate different wars from different profiles

耗尽温柔 提交于 2020-01-06 13:43:30

问题


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?


回答1:


Maybe you can write scipt with all those maven commands




回答2:


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,




回答3:


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



来源:https://stackoverflow.com/questions/22833557/maven-generate-different-wars-from-different-profiles

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