有没有办法在 Maven 中使用属性的子字符串来激活配置文件?我希望使用 Jenkins 将分支名称简单地传递到我的构建,并激活一个配置文件(如果它是 release/* 分支)。
有什么方法可以像这样进行参数操作以激活配置文件?前任:
<profiles>
<profile>
<id>appserverConfig-dev</id>
<activation>
<property>
<name>branch</name>
<!-- some form of wildcarding or regex on the parameter value ??? -->
<value>release/.*</value>
</property>
</activation>
<properties>
<appserver.home>/path/to/dev/appserver</appserver.home>
</properties>
</profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)
或者是否有更好的方法可以用来仅在构建来自发布分支时激活配置文件?
| 归档时间: |
|
| 查看次数: |
971 次 |
| 最近记录: |