You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Benedict (JIRA)" <ji...@codehaus.org> on 2008/11/18 17:49:41 UTC

[jira] Issue Comment Edited: (MWAR-60) Source Excludes are being applied to WAR file

    [ http://jira.codehaus.org/browse/MWAR-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154605#action_154605 ] 

paul4christ79 edited comment on MWAR-60 at 11/18/08 10:49 AM:
--------------------------------------------------------------

For posterity, here is the solution. It turns out the trick is not specifying the ${basedir} at all in the excludes:
{noformat}<warSourceExcludes>WEB-INF/classes/**,WEB-INF/lib/**</warSourceExcludes>{noformat}



      was (Author: paul4christ79):
    For posterity, here is the solution. It turns out the trick is not specifying the ${basedir} at all in the excludes:
<warSourceExcludes>WEB-INF/classes/**,WEB-INF/lib/**</warSourceExcludes>


  
> Source Excludes are being applied to WAR file
> ---------------------------------------------
>
>                 Key: MWAR-60
>                 URL: http://jira.codehaus.org/browse/MWAR-60
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>         Environment: WinXP, jdk1.5.0_07, mvn 2.0.4
>            Reporter: Chuck Deal
>            Assignee: Stephane Nicoll
>             Fix For: 2.1-alpha-2
>
>
> My scenario:
> I use Eclipse 3.1.1 to develop the web app.  I run Tomcat 5.5.17 with it's docbase pointed at the source tree (/src/main/webapp).  As a result, I have files that are required by Tomcat to run, but not to be included in the WAR.  Specifically, I have a WEB-INF folder with a classes directory that includes classes that will actually be included in the WAR as a JAR (as well as a few other things).  
> As you can see in the following plugin snippet, I specifically exclude the WEB-INF folder from the source tree because all of its contents will be gathered by the various stages of the build process (process-resources, etc) and included in the WAR when it is "exploded"
> I had been using the following plugin snippet for generating my War (war plugin 2.0)
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-war-plugin</artifactId>
>   <version>2.0</version>
>   <configuration>
>     <webXml>target/jspweb.xml</webXml>
>     <warName>aims</warName>
>     <excludes>**/*.jsp*, **/JasperReports/*.*, **/WEB-INF/**/*.*</excludes>
>   </configuration>
> </plugin>
> If you change the version from 2.0 to 2.0.1, you will no longer generate the same WAR file!  Instead, v2.0.1 uses the source excludes and applies them to the WAR construction as well.  This means that the exploded WEB-INF (the correct one) is also removed from the WAR file.  
> I don't think that the source excludes should be applied to the WAR construction, only to the stage where the source files are "exploded" (as in v2.0)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira