继承Maven配置文件 [英] Inheriting Maven profiles
本文介绍了继承Maven配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
子POM是否可以继承在父POM中定义的配置文件?如果可以,怎么办?
Is it possible for a child POM to inherit profiles defined in the parent POM? If so, how?
推荐答案
在父POM中定义的配置文件是在扩展了父POM的子POM中继承的.以防万一, Maven帮助插件具有非常有用的目标,可以处理带有个人资料:
Profiles defined in a parent POM are inherited in a child POM extending the parent, there is nothing to do. And just in case, the Maven Help Plugin has very useful goals allowing to deal with profiles:
-
help:active-profiles
:列出了当前在构建中处于活动状态的配置文件. -
help:all-profiles
:列出了当前项目下的可用配置文件.
这篇关于继承Maven配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文