ITeye博客

maven 之web项目的profile

85977328 · 2014-01-21 18:21 · maven · 企业架构 · Markdown

有时候maven管理war项目,需要根据不同的环境,使用不同的配置文件。 pom.xml文件如下 [code="xml"] 4.0.0 com.chinaso test war 1.0.0 http://maven.apache.org UTF-8 commons-dbcp commons-dbcp 1.4 commons-pool commons-pool 1.5.7 test maven-compiler-plugin 1.6 1.6 UTF-8 org.apache.maven.plugins maven-war-plugin false ${app_config_path} false WEB-INF/conf dev src/main/conf/dev true test src/main/conf/test online src/main/conf/online [/code] 打包命令 mvn clean package -Dmaven.test.skip=true -Pdev 输出日志 [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ test --- [INFO] Packaging webapp [INFO] Assembling webapp [test] in [E:\x\test\target\y] [INFO] Processing war project [INFO] Copying webapp webResources [E:\E:\x\test\target\ysrc/main/conf/dev] to [E:\x\test\target\y] [INFO] Copying webapp resources [E:\x\test\target\y\src\main\webapp] [INFO] Webapp assembled in [4776 msecs] [INFO] Building war: E:\x\test\target\vertical-search.war [WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored (webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true') 参考文章 http://lishuaibt.iteye.com/blog/614783

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。