[ 
https://jira.codehaus.org/browse/MASSEMBLY-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=352970#comment-352970
 ] 

Karl-Heinz Marbaise commented on MASSEMBLY-648:
-----------------------------------------------

So i have tried to reproduce the problem with maven-assembly-plugin:2.3 and 
maven-assembly-plugin:2.4 and maven-assembly-plugin:2.4.1. 
{code}
[INFO] --- maven-assembly-plugin:2.3:single (assemly) @ assembly-lineEnding ---
[INFO] Reading assembly descriptor: src/main/assembly/bin.xml
[INFO] Building zip: 
/massembly/massembly-648/target/assembly-lineEnding-1.0-SNAPSHOT-bin.zip
[INFO] Building tar: 
/massembly/massembly-648/target/assembly-lineEnding-1.0-SNAPSHOT-bin.tar.gz
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.185s
[INFO] Finished at: Sun Sep 21 22:51:23 CEST 2014
[INFO] Final Memory: 15M/215M
[INFO] ------------------------------------------------------------------------
$ ls -al target/
archive-tmp/                                 
assembly-lineEnding-1.0-SNAPSHOT-bin.zip
assembly-lineEnding-1.0-SNAPSHOT-bin.tar.gz  work-tmp/
$ ls -al target/archive-tmp/fileSetFormatter.
fileSetFormatter.1954286275.tmp/ fileSetFormatter.344610494.tmp/
$ ls -al target/archive-tmp/fileSetFormatter.
fileSetFormatter.1954286275.tmp/ fileSetFormatter.344610494.tmp/
$ ls -al target/archive-tmp/fileSetFormatter.1954286275.tmp/
total 3696
drwxr-xr-x  4 kama  staff     136 Sep 21 22:51 .
drwxr-xr-x  4 kama  staff     136 Sep 21 22:51 ..
-rw-r--r--  1 kama  staff  942171 Sep 21 22:51 maven-core-3.0.5.jar
-rw-r--r--  1 kama  staff  942171 Sep 21 22:51 
maven-core-3.0.5.jar.281164798.formatted
$ ls -al target/work-tmp/
deps/                 maven-core-3.0.5.jar
$ ls -al target/work-tmp/
total 1096
drwxr-xr-x  4 kama  staff     136 Sep 21 22:51 .
drwxr-xr-x  6 kama  staff     204 Sep 21 22:51 ..
drwxr-xr-x  3 kama  staff     102 Sep 21 22:51 deps
-rw-r--r--  1 kama  staff  558991 Sep 21 22:51 maven-core-3.0.5.jar
{code}
Which means that already in maven-assembly-plugin:2.3 the file has been 
corrupted. The original size is 558991 bytes size which is changed.

I have also tested the same scenario with maven-assembly-plugin:2.4 and 
maven-assembly-plugin:2.4.1 and no change in behaviour. This means i'm at the 
moment not able to reproduce the problem.

So the questions is if we see such configuration which must result in corrupted 
jar files as wrong and try to generate a warnging etc. from it?

> lineEnding in fileSet corrupts jar files
> ----------------------------------------
>
>                 Key: MASSEMBLY-648
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-648
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4
>         Environment: Maven 3.0.5 on Mac Os 10.8.3 with Apple JDK 1.6.0_43
> Maven 3.0.5 on Windows XP with Oracle JDK 1.6.0_31
>            Reporter: Anders Hammar
>            Priority: Minor
>             Fix For: 2.5
>
>         Attachments: assembly-lineEnding.zip
>
>
> I've found a difference in behavior between v2.3 and v2.4 of the plugin. If 
> lineEnding is set to, for example, unix for a fileSet which contains jar 
> files, the jar files are modified and corrupt with v2.4. This was not the 
> case with v2.3. See attached test project.
> Not sure if this is an actual bug in the plugin, or rather a misconfiguation 
> in the project. But the behavioral change between the versions is a fact. :-)
> If this is not a bug, maybe we could try to detect misconfiguration like this 
> and output a warning?



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to