Maven:从不同的配置文件产生不同的战争 [英] Maven: Generate different wars from different profiles

查看:82
本文介绍了Maven:从不同的配置文件产生不同的战争的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序项目.该项目具有不同的Maven配置文件(针对国家和环境),并具有已过滤的属性.我必须执行多次才能获得不同的战争,但我想一次执行所有的战争.

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.

这可能吗?

推荐答案

问题还不太清楚,但是如果您只想在一次Maven执行中运行"多个配置文件,就和

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

每个都有自己的WAR构建执行.

each with it's own WAR build execution.

干杯

这篇关于Maven:从不同的配置文件产生不同的战争的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆