Dawid Weiss created MASSEMBLY-769:
-------------------------------------

             Summary: ZIP fileMode permissions not properly set with 
dependencySet and unpackOptions
                 Key: MASSEMBLY-769
                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-769
             Project: Maven Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.5.4, 2.5.3
            Reporter: Dawid Weiss
            Priority: Minor


This issue first appeared in 2.5.3 and applies to an assembly with filtered 
dependencies and fileMode set, as in here:
{code}
    <dependencySet>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>test:child1</include>
      </includes>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <useTransitiveFiltering>true</useTransitiveFiltering>
      <useProjectArtifact>false</useProjectArtifact>
      <unpack>true</unpack>
      <unpackOptions>
        <includes>
            <include>foo</include>
        </includes>
      </unpackOptions>
      <fileMode>0755</fileMode>
    </dependencySet>
{code}

The output ZIP had proper file mode flags in 2.5.2, but from 2.5.3 on it's 
incorrect.

Steps to reproduce:
{code}
unzip example.zip
cd example
mvn clean package
zipinfo child2/target/*.zip
{code}

Output (slightly trimmed) for 2.5.3 and 2.5.4:
{code}
Archive:  c:\_tmp\example\example\child2\target\foo-1.0-SNAPSHOT-private.zip
Zip file size: 565 bytes, number of entries: 4
drwxr-xr-x  2.0 unx        0 b- stor 15-May-18 13:45 foo-1.0-SNAPSHOT/
-rw-r--r--  2.0 unx        3 bl defN 15-May-18 13:45 foo-1.0-SNAPSHOT/README.txt
-rw-r--r--  2.0 unx        3 bl defN 15-May-18 13:45 foo-1.0-SNAPSHOT/l4g
-rw-r--r--  2.0 unx        3 bl defN 15-May-18 13:45 foo-1.0-SNAPSHOT/l4g.cmd
{code}

output for 2.5.2 (note the 'x' flag for ``l4g`` files):
{code}
Archive:  c:\_tmp\example\example\child2\target\foo-1.0-SNAPSHOT-private.zip
Zip file size: 565 bytes, number of entries: 4
drwxr-xr-x  2.0 unx        0 b- stor 15-May-18 13:47 foo-1.0-SNAPSHOT/
-rw-r--r--  2.0 unx        3 bl defN 15-May-18 13:47 foo-1.0-SNAPSHOT/README.txt
-rwxr-xr-x  2.0 unx        3 bl defN 15-May-18 13:47 foo-1.0-SNAPSHOT/l4g
-rwxr-xr-x  2.0 unx        3 bl defN 15-May-18 13:47 foo-1.0-SNAPSHOT/l4g.cmd
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to