maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petar Tahchiev (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MASSEMBLY-264) Filtering in Assembly Generates Blank Files in the Archive
Date Wed, 03 Sep 2008 12:54:48 GMT

    [ http://jira.codehaus.org/browse/MASSEMBLY-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146828#action_146828
] 

Petar Tahchiev commented on MASSEMBLY-264:
------------------------------------------

Hi Neill,

I tested with your test-project and with both 2.2-beta-2 and 2.2-beta-3-SNAPSHOT and I can't
reproduce this issue. 

Please, can you retest once again and report here if this issue is still relevant.

Thanks, Petar.

> Filtering in Assembly Generates Blank Files in the Archive
> ----------------------------------------------------------
>
>                 Key: MASSEMBLY-264
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-264
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-1
>            Reporter: Neill Alexander
>             Fix For: 2.2-beta-3
>
>         Attachments: maven-assembly-plugin-bug-test.tar.gz
>
>
> When filers are filtered during assembly, the result is an empty file in the archive
(see output from unzip below):
> $ unzip -l assembly-bug-1.0.0-SNAPSHOT-buggy.zip 
> Archive:  assembly-bug-1.0.0-SNAPSHOT-buggy.zip
>   Length     Date   Time    Name
>  --------    ----   ----    ----
>         0  15/01/08 13:05   assembly-bug-1.0.0-SNAPSHOT/
>         0  15/01/08 13:05   assembly-bug-1.0.0-SNAPSHOT/bin/
>         0  15/01/08 13:05   assembly-bug-1.0.0-SNAPSHOT/bin/test.ini
>  --------                   -------
>         0                   3 files
> This appears to be a result of some recent changes to the src/main/java/org/apache/maven/plugin/assembly/archive/task/AddFileSetsTask.java
file (changeset 591556) which deletes the files from the temporary directory. The problem
with this is that the archive object has a reference to the filtered files in the temporary
directory. When the call to archive.createArchive( ) is made it can't find the filtered files,
and therefore they end up empty in the archive.
> The attached archive contains a test maven project you can run which will demonstrate
this bug. Run 'mvn clean assembly:assembly' and check out the contents of target/assembly-bug-1.0.0-SNAPSHOT-buggy.zip
> The simply fix is simply to roll-back the 'finally' clause added as part of 591556 to
src/main/java/org/apache/maven/plugin/assembly/archive/task/AddFileSetsTask.java. Whether
or not it is the best fix, I don't know (hence the absence of a patch).

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

        

Mime
View raw message