执行多个Maven配置文件 [英] Executing multiple maven profiles
本文介绍了执行多个Maven配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用maven命令行执行多个maven配置文件
I'm trying to execute multiple maven profiles using maven commandline
mvn clean process-resources -P<Profile1>,<Profile2>
但是它仅对Profile2执行,而Profile1则从不执行.通过命令行执行多个配置文件需要帮助.
But it only executes for Profile2, Profile1 is never executed. Help is required on executing multiple profiles through commandline.
还请注意,当我列出活动配置文件时,它会将两个配置文件都显示为活动状态.
Also note that when I list active profiles, it shows both profiles as active.
推荐答案
mvn clean install -P profile-1,profile-2
这应该可以正常工作.配置文件不必显式处于活动状态.
This should work fine. profiles doesn't have to be explicitly active.
这篇关于执行多个Maven配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文