开发者

Rename to web.xml when packaging using Eclipse

开发者 https://www.devze.com 2023-03-12 11:14 出处:网络
I have a J2EE application which has two web.xml files. One is called web.live.xml another is web.dev.xml. I am building this application with maven using profiles. So maven knows which file t开发者_St

I have a J2EE application which has two web.xml files. One is called web.live.xml another is web.dev.xml. I am building this application with maven using profiles. So maven knows which file t开发者_StackOverflowo choose when packaging.

I was wondering is it possible to make Eclipse use web.dev.xml when packaging my project and deploying it to Tomcat. This would be very useful because web.dev.xml sets some options which decrease start up time of the application.


You can designate the dev xml to be default (and name it web.xml). You can also have maven move (from a different folder) rather than rename.


You can use the Maven resources plugin (http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html) and configure it with a property in the profile and use that property in the configuration of the filename.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号