maven profile 正式打包替换
来源:互联网 发布:泳衣女款淘宝网 编辑:程序博客网 时间:2024/05/22 10:48
很多情况是测试环境跟正式配置有所差异,若每次手动替换覆盖,则特别痛苦。maven profile 则可解决这困扰。
定义不同的id 正式可执行替换
可将测试配置统一导入applicationContext-import-test.xml 文件
正式配置统一导入applicationContext-import-replace.xml 文件
开发测试applicationContext-mass-client.xml
<import resource="applicationContext-import-test.xml" />
正式
<import resource="applicationContext-import-replace.xml" />
<profiles><profile><id>pro</id><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId><version>1.7</version><!--$NO-MVN-MAN-VER$ --><executions><execution><id>antrun2</id><phase>package</phase><goals><goal>run</goal></goals><configuration><target><replace dir="target" encoding="utf-8"><include name="**/web.xml" /><replacetoken>default</replacetoken><replacevalue>resin-file</replacevalue></replace><replace dir="target" encoding="utf-8"><include name="**/applicationContext-mass-client.xml" /><replacetoken>applicationContext-import-test.xml</replacetoken><replacevalue>applicationContext-import-replace.xml</replacevalue></replace></target></configuration></execution></executions></plugin></plugins></build></profile></profiles>
运行命令 clean install -U -Ppro -Dmaven.test.skip=true
则可替换正式配置
1 0
- maven profile 正式打包替换
- Maven Profile多环境打包
- 激活Maven profile同时打包
- 使用maven profile 实现不同环境打包
- maven profile实现多环境打包
- maven profile实现多环境打包
- 用Maven profile实现不同的打包策略
- java学习笔记8 - maven profile实现多环境打包
- maven通过profile不同,实现环境进行打包
- java学习笔记8 - maven profile实现多环境打包
- Maven针对不同的环境使用Profile完成打包部署
- Maven针对不同的环境使用Profile完成打包部署
- 使用maven profile指定配置文件打包适用多环境
- 使用Maven的profile对生产测试环境打包
- maven多profile 打包下 -P参和-D参数
- Maven打包到nexus(快照和正式jar包)
- MAVEN Profile
- maven profile
- 父类、静态构造代码块、构造代码块、构造函数
- PHP array_reverse() 函数
- 双击返回键退出
- PHP 购物车 session(非框架)
- 把数组排成最小的数
- maven profile 正式打包替换
- 使用Python配合Evernote完成每周工作安排
- Azure Stack Technical Preview (POC)硬件需求
- maven项目结构及生命周期
- C#之 十九 使用WinForm控件
- MySQL中的insert into类似用法
- R语言︱情感分析—基于监督算法R语言实现(二)
- **OA项目——问题集
- 访问限制