Rename to web.xml when packaging using Eclipse
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.
精彩评论