jira-importer opened a new issue, #166:
URL: https://github.com/apache/maven-war-plugin/issues/166

   **[David 
Hawkins](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dhawkins)**
 opened 
**[MWAR-8](https://issues.apache.org/jira/browse/MWAR-8?redirect=false)** and 
commented
   
   We added functionality to the maven-war-plugin to copy the contents of 
dependent wars into the war being built.  It will never overwrite existing 
files and has configurable includes and excludes which are applied to the files 
being copied.
   
   Also made a minor change in getExcludes to not add the default excludes from 
FileUtils.  The default excludes were already being added in the method 
getWarFiles( File sourceDir ) by scanner.addDefaultExcludes().
   
   We are trying to integrate Maven into our environment and not having this 
functionality was a show-stopper for us.  We have applications that reuse jsps, 
and .tag files from a generic war that need to be included in all of our wars.  
We have also seen people request this functionality.
   
   By default these changes will have no effect, unless you have wars specified 
in your \<dependencies>.
   
   Here is an example configuration that uses the includes and excludes for the 
dependent wars.
   
   \<plugin>
   \<groupId>org.apache.maven.plugins\</groupId>
   \<artifactId>maven-war-plugin\</artifactId>
   \<version>2.0-beta-3-SNAPSHOT\</version>
   \<configuration>
   \<!-- This is the default for dependentWarIncludes
   \<dependentWarIncludes>**\</dependentWarIncludes>
   -->
   \<dependentWarExcludes>**/*.properties\</dependentWarExcludes>
   \</configuration>
   \</plugin>
   
   It will not overwrite existing files that are already in the war, the way to 
get around this is to remove the files you want overwritten using the standard 
excludes configuration.  For example, the following configuration would allow 
the overwriteme.jar to be overwritten by something in a dependent war.
   
   \<configuration>
   \<excludes>WEB-INF/lib/overwriteme.jar\</excludes>
   \</configuration>
   
   
   ---
   
   **Attachments:**
   - 
[MNG-1507-maven-war-plugin.patch](https://issues.apache.org/jira/secure/attachment/12720537/MNG-1507-maven-war-plugin.patch)
 (_8.92 kB_)
   
   1 votes, 1 watchers
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to