Maven的settings.xml文件结构之activeProfiles
2016-08-25 09:18
351 查看
无论是在pom.xml文件中,还是在settings.xml文件中,都可以配置多个<profile>。但是并非所有的<profile>都会被激活,即该<profile>的配置生效与否,可以通过如下方式进行控制:
在pom.xml文件中通过<profile>的<activation>
在settings.xml文件中通过<profile>的<activation>
在settings.xml文件中通过<activeProfiles>
其中,通过<profile>的<activation>配置激活对应的<profile>条件,这个在pom.xml文件中和在settings.xml文件中是一致的,详见pom.xml文件的配置。
在settings.xml文件中,还可以通过<activeProfiles>直接给出被激活的<profile>(可以有多个),示例如下:
<activeProfiles>
<activeProfile>env-test</activeProfile>
</activeProfiles>
在上述示例中,默认激活<id>env-test</id>的<profile>。当然,也可以根据需要,默认激活多个<profile>。
在pom.xml文件中通过<profile>的<activation>
在settings.xml文件中通过<profile>的<activation>
在settings.xml文件中通过<activeProfiles>
其中,通过<profile>的<activation>配置激活对应的<profile>条件,这个在pom.xml文件中和在settings.xml文件中是一致的,详见pom.xml文件的配置。
在settings.xml文件中,还可以通过<activeProfiles>直接给出被激活的<profile>(可以有多个),示例如下:
<activeProfiles>
<activeProfile>env-test</activeProfile>
</activeProfiles>
在上述示例中,默认激活<id>env-test</id>的<profile>。当然,也可以根据需要,默认激活多个<profile>。
相关文章推荐
- Maven的settings.xml文件结构之activeProfiles
- Maven的settings.xml文件结构之profiles
- Maven的settings.xml文件结构之proxies
- Maven的settings.xml文件结构详解
- Maven的settings.xml文件结构之proxies
- Maven的settings.xml文件结构详解
- Maven的settings.xml文件结构之mirrors
- Maven的settings.xml文件结构之mirrors
- Maven的settings.xml文件结构之mirrors
- Maven的settings.xml文件结构之servers
- Maven的settings.xml文件结构之mirrors
- Maven的settings.xml文件结构之servers
- maven配置settings.xml文件详解
- maven settings.xml配置文件详解
- Maven学习笔记之配置文件(settings.xml)
- Maven settings.xml文件配置官方说明
- 分享一个快的飞起的maven的settings.xml文件
- maven 配置文件settings.xml
- maven settings.xml配置文件详解
- Maven配置文件settings.xml详解