[ https://jira.codehaus.org/browse/MASSEMBLY-709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=352077#comment-352077 ]
Karl-Heinz Marbaise commented on MASSEMBLY-709: ----------------------------------------------- I have to acknowledge the wrong behaviour with version 2.4.1 as well. > When assembling a zip on windows duplicate files are added to the assembly > -------------------------------------------------------------------------- > > Key: MASSEMBLY-709 > URL: https://jira.codehaus.org/browse/MASSEMBLY-709 > Project: Maven Assembly Plugin > Issue Type: Bug > Components: maven-archiver > Affects Versions: 2.4 > Environment: Apache Maven 3.0.5 > (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 05:51:28-0800) > Maven home: C:\bin\apache-maven-3.0.5 > Java version: 1.7.0_60, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0_60\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows server 2008 r2", version: "6.1", arch: "amd64", family: > "windows" > Reporter: Jason Lemay > Attachments: sample.zip > > > When assembling a zip where duplicate files are copied to the output > directory the default behavior is for the first file to copy and the > remaining ones to be skipped. When building a project on windows this is not > the behavior. On Windows all the duplicate files are added to the final zip > assembly. > This was tested on OSX, CentOS, and Windows Server 2009 R2. > Using OSX with these settings: > {code} > Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 > 05:51:28-0800) > Maven home: /usr/local/Cellar/maven30/3.0.5/libexec > Java version: 1.7.0_60, vendor: Oracle Corporation > Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac" > {code} > Running the mvn build as such: > {code} > mvn -X clean install > {code} > You end up with this logged to the console: > {code} > [INFO] Building zip: /Users/jasonl/Desktop/sample/target/sample.zip > [DEBUG] adding directory sample/ > [DEBUG] adding directory sample/conf/ > [DEBUG] adding entry sample/conf/ConfFile.txt > [DEBUG] adding entry sample/file.txt > [DEBUG] sample/conf/ConfFile.txt already added, skipping > {code} > When the final zip is examined there are no duplicate files. The plugin > worked as intended. The same results were obtained in the CentOS test. > The problem arises when you build on windows. > Building with these settings: > {code} > Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 > 05:51:28-0800) > Maven home: C:\bin\apache-maven-3.0.5 > Java version: 1.7.0_60, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0_60\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows server 2008 r2", version: "6.1", arch: "amd64", family: > "windows" > {code} > And running the same mvn command: > {code} > mvn -X clean install > {code} > The following is output to the console: > {code} > [INFO] Building zip: C:\Users\Administrator\Desktop\sample\target\sample.zip > [DEBUG] adding directory sample/ > [DEBUG] adding directory sample/conf/ > [DEBUG] adding entry sample/conf/ConfFile.txt > [DEBUG] adding entry sample/file.txt > [DEBUG] adding entry sample/conf/ConfFile.txt > {code} > As you can see the assembly did not skip the second ConfFile.txt addition. > When the final zip assembly is examined there is infact 2 ConfFile.txt files > under the conf directory. > Attached is the sample I used. -- This message was sent by Atlassian JIRA (v6.1.6#6162)