[ http://jira.codehaus.org/browse/MAVEN-1815?page=comments#action_79555 ] Arnaud Heritier commented on MAVEN-1815: ----------------------------------------
It seems to be a bug. I don't know when it was introduced. In the plugin code, for the goal war:war-resources, we have : {code:xml} <j:if test="${webSourcesPresent == 'true'}"> <ant:copy todir="${maven.war.webapp.dir}" filtering="on" preservelastmodified="true" overwrite="${maven.war.resources.overwrite}"> <ant:fileset dir="${maven.war.src}" includes="${maven.war.src.includes}" excludes="${maven.war.src.excludes}"> </ant:fileset> <j:if test="${maven.war.property.expansion}" > <ant:filterchain> <ant:expandproperties/> </ant:filterchain> </j:if> </ant:copy> </j:if> {code} The filtering is activated but if you exclude your images using maven.war.src.excludes, these ones will not be copied. Temporarly, what you can do it's to define your binary resources in maven.war.src.exclude. For example : maven.war.src.exclude=**/*.gif,**/*.jpg Then you add a post goal of war:war-resources in you project to copy your binary resources without filter : {code:xml} <postGoal name="war:war-resources"> <j:if test="${webSourcesPresent == 'true'}"> <ant:copy todir="${maven.war.webapp.dir}" filtering="off" preservelastmodified="true" overwrite="${maven.war.resources.overwrite}"> <ant:fileset dir="${maven.war.src}" includes="${maven.war.src.excludes}" excludes="${maven.war.src.includes}"> </ant:fileset> <j:if test="${maven.war.property.expansion}" > <ant:filterchain> <ant:expandproperties/> </ant:filterchain> </j:if> </ant:copy> </j:if> </postGoal> {code} (You noticed that I reversed excludes and includes) With that it should works. For us, what we have to do is either to remove the filtering (I don't know if it useful) or to keep it but to add a property maven.war.bin.excludes which will be used to don't copy this resources with a filter. > corrupt images after copy > ------------------------- > > Key: MAVEN-1815 > URL: http://jira.codehaus.org/browse/MAVEN-1815 > Project: Maven 1.x > Issue Type: Bug > Affects Versions: 1.1-beta-3 > Reporter: G.J. Sterenborg > Attachments: descending.gif, descending.gif, descending.gif > > > maven-1.1-beta-3 seems to corrupt images during a <copy>. > I'll attach two samples: > - corrupt-copy (2284 bytes) > - original (843 bytes) -- 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