They modify the POM at build time, and are meant to be used in complementary sets to give equivalent-but-different parameters for a set of target environments (providing, for example, the path of the appserver root in the development, testing, and production environments). \

Profiles specified in the POM can modify the following POM elements:

  • <repositories>
  • <pluginRepositories>
  • <dependencies>
  • <plugins>
  • <properties> (这是compile time的maven properties,不是system properties)
  • <modules>
  • <reporting>
  • <dependencyManagement>
  • <distributionManagement>
  • a subset of the <build> element, which consists of:
    • <defaultGoal>
    • <resources>
    • <testResources>
    • <finalName>

可以用mvn help:active-profiles来查看被active的profiles。

在spring configuration file里用的${sut.env}是system properties,如果想让maven properties来代替它,需要将这个spring xml file包含进<build><resources>里面。否则的话,就需要在profile里加上<build><plugin><configuration><systemPropertyVariables>。

Maven Build profiles的更多相关文章

  1. Maven Build Profiles--reference

    What is Build Profile? A Build profile is a set of configuration values which can be used to set or ...

  2. Spring Boot-右键maven build成功但是直接运行main方法出错的解决方案

    1.代码就一个Controller,从官网复制过来的,如下 package com.springboot.controller; import org.springframework.boot.Spr ...

  3. Maven build标签

    前言: <build >设置,主要用于编译设置 1.分类 在Maven的pom.xml文件中,存在如下两种<build>: (1)全局配置(project build) 针对整 ...

  4. maven中profiles使用详解

    使用的场景 常常遇到一些项目中多环境切换的问题.比如在开发过程中用到开发环境,在测试中使用测试环境,在生产中用生产环境的情况.springboot中提供了 spring.profile.active的 ...

  5. maven:log4j:WARN No appenders could be found for logger (loggerInfo).或者maven build error:org.apache.maven.lifecycle.LifecycleExecutionExceptio

    maven在build构建时,加载资源文件时需要配置资源文件插件: 1,在pom.xml文件中加入 <build> <finalName>${project.build.tar ...

  6. 在eclipse如何删除无效的maven build

    在Eclipse的maven项目中,点击一次“maven build...”明明没有配置,它也就会产生一个maven build,那么如何删除这些无效的配置呢?

  7. Maven Build Life Cycle--reference

    What is Build Lifecycle? A Build Lifecycle is a well defined sequence of phases which define the ord ...

  8. No compiler is provided in this environment. --Maven build失败

    今天,maven build 失败了, 遇到下面的问题 经过查找,通过这个大佬的blog(  https://blog.csdn.net/lslk9898/article/details/738367 ...

  9. 转:eclipse maven build、maven install 等区别

    原文地址:eclipse maven build.maven install 等区别

随机推荐

  1. HTML5自学笔记[ 24 ]canvas绘图之星空草地

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  2. NCrawler 学习

    NCrawler是一款国外的开源网络爬虫软件,遵循LGPL许可协议.其HTML处理使用的是htmlagilitypack开源库,采用xpath的方式处理定位网页元素,十分方便.同时其采用HttpWeb ...

  3. openCV1

    openCV是一个提供有C++ , android , python的开源图像处理的类库 中文论坛的网址是http://www.opencv.org.cn/forum.php?mod=forumdis ...

  4. IE中JavaScript 的异常处理

    错误类型 编程中我们会遇到四种错误:编译错误.逻辑错误.输入/验证错误.运行时错误,但是在JavaScript中我们只能最后两种错误. JavaScript 1.5定义了六种错误类型: EvalErr ...

  5. A-Apple Catching(POJ 2385)

    Apple Catching Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8759   Accepted: 4264 De ...

  6. 读流testDemo

    import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.I ...

  7. JDE开发端安装问题(JDE初步卸载重装)

    JDE版本:9.1.4 所遇场景:安装JDE客户端.WEBServer后,卸载重新安装.在安装client后提示找不到DV\PY包. 日志installActionsXXX.log中显示 信息: 10 ...

  8. Java DES 加解密文件

    import com.mchange.v2.io.DirectoryDescentUtils; import javax.crypto.Cipher;import javax.crypto.Ciphe ...

  9. String.resize()

    void resize (size_t n); void resize (size_t n, char c); 测试代码: // resizing string #include <iostre ...

  10. JS引用类型之——RegExp

    前言 之前小猪分享过关于正则表达式的一些内容,具体请看传送门,今天小猪来分享怎么在js中使用正则表达式. 定义 ECMAScript通过RegExp类型来支持正则表达式.使用下面类似Perl的语法,就 ...