jira-importer commented on issue #95:
URL: 
https://github.com/apache/maven-war-plugin/issues/95#issuecomment-2967841992

   **[Niklas 
Therning](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=niklas)** 
commented
   
   I read the documentation on the war plugin 
(http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html) and it should 
be possible to send in a comma separated list of excludes. I looked into the 
source but couldn't find anything that can make this work, so I think this is 
bug. The code below depends on the commons StringUtils helper class.
   
       protected String[] getExcludes()
       {
           List excludeList = new ArrayList( 
FileUtils.getDefaultExcludesAsList() );
           if ( warSourceExcludes != null && !"".equals( warSourceExcludes ) )
           {
               String[] excludes = StringUtils.split(warSourceExcludes, ",");
               for (int i = 0; i < excludes.length; i++) 
               {
                 String exclude = excludes[i];
                 excludeList.add( exclude );
               }
           }
       
           // if webXML is specified, omit the one in the source directory
           if ( getWebXml() != null && !"".equals( getWebXml() ) )
           {
               excludeList.add( "**/" + WEB_INF + "/web.xml" );
           }
       
           return (String[]) excludeList.toArray( EMPTY_STRING_ARRAY );
       }
   
   I haven't written a testcase or even tested the code, but I want to verify 
if I've understood the function right.
   


-- 
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

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

Reply via email to