LibraryToggle FramesPrintFeedback

It is possible to customize the Maven WAR plug-in by adding an entry to the plugins section of the pom.xml file. Most of the configuration options are concerned with adding additonal resources to the WAR package. For example, to include all of the resources under the src/main/resources directory (specified relative to the location of pom.xml) in the WAR package, you could add the following WAR plug-in configuration to your POM:

<project ...>
          <!-- Optionally specify where the web.xml file comes from -->
          <!-- Optionally specify extra resources to include -->

The preceding plug-in configuration customizes the following settings:

For complete details of how to configure the Maven WAR plug-in, see


Do not use version 2.1 of the maven-war-plugin plug-in, which has a bug that causes two copies of the web.xml file to be inserted into the generated .war file.

Comments powered by Disqus
loading table of contents...