You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "G.J. Sterenborg (JIRA)" <ji...@codehaus.org> on 2006/11/07 14:27:31 UTC

[jira] Created: (MAVEN-1815) corrupt images after copy

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

        

[jira] Commented: (MAVEN-1815) corrupt images after copy

Posted by "G.J. Sterenborg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1815?page=comments#action_79588 ] 
            
G.J. Sterenborg commented on MAVEN-1815:
----------------------------------------

Our maven.xml contained:
{noformat} 
<preGoal name="war:init">
   <ant:tstamp>
     <format property="TODAY_LONG" pattern="dd-MM-yyyy" locale="en"/>
   </ant:tstamp>
   <ant:filter token="DATE_FORMAT" value="dd-MM-yyyy" />
   <ant:filter token="BUILD_DATE" value="${TODAY_LONG}" />
</preGoal>
{noformat} 
Removing this preGoal fixed the problem.

Wouldn't it be better to be able to enable/disable filtering via a property?

> 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

        

[jira] Updated: (MPWAR-68) corrupt images after copy

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPWAR-68?page=all ]

Arnaud Heritier updated MPWAR-68:
---------------------------------

    Fix Version/s: 1.6.3

> corrupt images after copy
> -------------------------
>
>                 Key: MPWAR-68
>                 URL: http://jira.codehaus.org/browse/MPWAR-68
>             Project: maven-war-plugin
>          Issue Type: Bug
>    Affects Versions: 1.6.2
>            Reporter: G.J. Sterenborg
>             Fix For: 1.6.3
>
>         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

        

[jira] Commented: (MAVEN-1815) corrupt images after copy

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1815?page=comments#action_79559 ] 
            
Lukas Theussl commented on MAVEN-1815:
--------------------------------------

The filtering in the war plugin was introduced in MPWAR-46. However, the ear and jar plugins don't use the ant:copy task but rather the  maven:copyResources tag of the maven jelly tag library. This sems to be an inconsistency unless I'm missing something. You said you also had problems with the ear and jar goals? In this case we'd have to fix this consistently for all plugins, otherwise, I'd say we just revert MPWAR-46.

> 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

        

[jira] Commented: (MAVEN-1815) corrupt images after copy

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] Closed: (MPWAR-68) corrupt images after copy

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPWAR-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephane Nicoll closed MPWAR-68.
--------------------------------

    Resolution: Fixed

Added maven.war.expansion.excludes property to exclude files during a property expansion copy (Fixes corruption of binary files). Applied property expansion to web.xml handling for consistency. Introduced the maven.war.src.filtering property to control whether filtering is enabled or not when copying webapp resources.

> corrupt images after copy
> -------------------------
>
>                 Key: MPWAR-68
>                 URL: http://jira.codehaus.org/browse/MPWAR-68
>             Project: maven-war-plugin
>          Issue Type: Bug
>    Affects Versions: 1.6.2
>            Reporter: G.J. Sterenborg
>            Assignee: Stephane Nicoll
>             Fix For: 1.6.3
>
>         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

        

[jira] Commented: (MAVEN-1815) corrupt images after copy

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1815?page=comments#action_79484 ] 
            
Lukas Theussl commented on MAVEN-1815:
--------------------------------------

What do you mean with 'during a copy'. What are you trying to do excactly?

> 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

        

[jira] Commented: (MAVEN-1815) corrupt images after copy

Posted by "G.J. Sterenborg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1815?page=comments#action_79488 ] 
            
G.J. Sterenborg commented on MAVEN-1815:
----------------------------------------

I apologize for the short description.

What I meant was a copy-operation in war-goals, ear-goals and jar goals.

When executing, for example, a 'maven war', and files are copied to the target directory before packaging the result is similar to the attached files.

> 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

        

[jira] Commented: (MAVEN-1815) corrupt images after copy

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1815?page=comments#action_79493 ] 
            
Arnaud Heritier commented on MAVEN-1815:
----------------------------------------

This problem is often due to the usage of a filter during the copy of binaries.
We'll try to see if there is a bad setting in a copy task.

> 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

        

[jira] Commented: (MPWAR-68) corrupt images after copy

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPWAR-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94673 ] 

Stephane Nicoll commented on MPWAR-68:
--------------------------------------

filter="on" is not the only problem. If you activate property expansion, you're stuck if you have binary files to copy. 

We can customize the filter property, not sure that this will solve the problem at all. (Still thinking)

> corrupt images after copy
> -------------------------
>
>                 Key: MPWAR-68
>                 URL: http://jira.codehaus.org/browse/MPWAR-68
>             Project: maven-war-plugin
>          Issue Type: Bug
>    Affects Versions: 1.6.2
>            Reporter: G.J. Sterenborg
>            Assignee: Stephane Nicoll
>             Fix For: 1.6.3
>
>         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

        

[jira] Commented: (MAVEN-1815) corrupt images after copy

Posted by "G.J. Sterenborg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1815?page=comments#action_79546 ] 
            
G.J. Sterenborg commented on MAVEN-1815:
----------------------------------------

If that is the case, is there some way to work around this?

> 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

        

[jira] Updated: (MAVEN-1815) corrupt images after copy

Posted by "G.J. Sterenborg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MAVEN-1815?page=all ]

G.J. Sterenborg updated MAVEN-1815:
-----------------------------------

    Attachment: descending.gif

> 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

        

[jira] Moved: (MPWAR-68) corrupt images after copy

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPWAR-68?page=all ]

Arnaud Heritier moved MAVEN-1815 to MPWAR-68:
---------------------------------------------

    Affects Version/s:     (was: 1.1-beta-3)
                       1.6.2
             Workflow: jira  (was: Maven New)
                  Key: MPWAR-68  (was: MAVEN-1815)
              Project: maven-war-plugin  (was: Maven 1.x)

> corrupt images after copy
> -------------------------
>
>                 Key: MPWAR-68
>                 URL: http://jira.codehaus.org/browse/MPWAR-68
>             Project: maven-war-plugin
>          Issue Type: Bug
>    Affects Versions: 1.6.2
>            Reporter: G.J. Sterenborg
>             Fix For: 1.6.3
>
>         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