Maven War Plugin Vincent Massol

This plug-in provides the ability to generate either a deployed webapp or a webapp packaged as a WAR file.

If you need to add extra dependencies in the web application, there are two properties you can use.

war.bundleThis property includes the dependency in /WEB-INF/lib
war.target.pathThis bundles the dependency in the path specified relative to the base of the web application.

For example, the following adds commons-lang to /WEB-INF/lib and myApplet to the /applets directory.

commons-lang 2.0 true myApplet 1.4 applets ]]>

If you need to copy the web.xml file in order to replace some filter tokens or simply perform some custom modification to it, simply write a pre-goal to the war:war goal in which you perform the manipulation. Then set the maven.war.webxml property to point to your modified web.xml.