Search code examples
maven-3maven-assembly-plugin

How to rename a file for a specific maven build profile


I've got changes to my web.xml config file that need to stay local-only since Google-App-Engine chokes on them when we try to use them, and they're really only needed for development purposes.

How can I make maven copy my src/main/webapp/WEB-INF/web_local.xml to be web.xml in the target WEB-INF directory?

I looked into maven-assembly-plugin, but that didn't provide a way to give a name to the ouput file (plus it seemed specifically for building .jar files).


Solution

  • You can use webXml property of the maven-war-plugin plugin configuration to point to custom web.xml