Maven assembly plugin not applying fileMode on unpacked dependencySet

允我心安 提交于 2019-12-04 03:38:18

问题


I have been banging my head against the wall all afternoon with this one. I need to create a pair of assemblies (zip and tgz) and need to set the correct executable permissions for shell scripts included in the archive.

It doesn't seem to make any difference what I do, the fileMode settings seem to have no effect. Here is a snippet from my assembly descriptor:

<dependencySet>
        <useProjectArtifact>false</useProjectArtifact>
        <useStrictFiltering>true</useStrictFiltering>
        <outputDirectory></outputDirectory>
        <unpack>true</unpack>
        <fileMode>0755</fileMode>
        <unpackOptions>
           <lineEnding>keep</lineEnding>
           <includes>
               <include>**/*.sh</include>
           </includes>
        </unpackOptions>
        <includes>
            <include>com.example:my-artifact:jar</include>
        </includes>
</dependencySet>

After untarring I do not see what I expect, e.g.

tar pxvf target/my-package-1.0.0-SNAPSHOT.tgz

I've tried with and without the p, but I still miss executable perms:

-rw-r--r--  1 MWard  staff  1468  3 Sep 09:58 a_script.sh

Any ideas as to where I may be going wrong? Thanks!


回答1:


This is a bug : https://issues.apache.org/jira/browse/MASSEMBLY-829

Solved in maven-assembly-plugin 3.0.0-SNAPSHOT



来源:https://stackoverflow.com/questions/32380530/maven-assembly-plugin-not-applying-filemode-on-unpacked-dependencyset

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!