活用maven使web.xml可以用maven变量
来源:互联网 发布:淘宝里怎么店铺收藏 编辑:程序博客网 时间:2024/05/22 01:35
<build> <finalName>${finalWarName}</finalName> <defaultGoal>compile</defaultGoal> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/main/webapp</directory> <filtering>true</filtering> <includes> <include>WEB-INF/web.xml</include> </includes> <targetPath>${project.build.directory}/${project.build.finalName}</targetPath> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <!-- http://maven.apache.org/plugins/maven-war-plugin/ --> <webXml>src/main/webapp/WEB-INF/web.xml</webXml> <outputDirectory>${war.outpath}</outputDirectory> </configuration> </plugin> </plugins> </build>
效果:
打包前:
<context-param> <param-name>spring.profiles.default</param-name> <param-value>${datasource.type}</param-value> </context-param>
打包后:
<context-param> <param-name>spring.profiles.default</param-name> <param-value>JDBC</param-value> </context-param>
0 0
- 活用maven使web.xml可以用maven变量
- 活用maven,使web.xml可以用maven变量
- Maven-web.xml参考
- maven中的web.xml
- maven--web.xml
- 【maven】web项目不需要web.xml,maven打包报错
- maven构造web项目 web.xml更改
- maven web项目配置1-web.xml
- Maven pom.xml配置常用的变量
- maven变量
- 用maven创建web
- maven项目中如何创建web.xml
- maven项目缺少web.xml问题解决
- maven tomcat插件 配置web.xml
- web 项目搭建 maven 中pom.xml
- myeclipse下web项目转maven,并保留WEB.XML
- 创建maven web项目时,没有web.xml文件
- maven工程web层的web.xml配置文档内容
- Android插件化学习
- [leetcode] 187 Repeated DNA Sequences
- 编译原理第一次作业
- Ubuntu实现网络链接设置
- 关于引入第三方jar包引发的java.lang.NoClassDefFoundError解决
- 活用maven使web.xml可以用maven变量
- Python读取中文txt乱码问题
- POJ 2773 Happy 2006(二分+容斥)
- 《机器学习实战》学习笔记:基于朴素贝叶斯的分类方法
- 行列式的理解
- Android工程导出jar包,同时导出javadoc
- html5+css3项目 (企业网站之标题)
- HDU 4407 Sum(容斥)
- 交换排序