maven assembly plugin do not set file attributes

ぐ巨炮叔叔 提交于 2019-12-14 02:23:12

问题


I know this is a duplicate of Maven assembly plugin not applying fileMode on unpacked dependencySet but it's still unanswered. My assembly is

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>distribution</id>
<formats>
    <format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
    <dependencySet>
        <outputDirectory></outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
        <fileMode>775</fileMode>
        <includes>
            <include>eu.els.inneo.tools:compare-files-shells</include>
        </includes>
        <unpack>true</unpack>
        <unpackOptions>
            <excludes>
                <exclude>META-INF/**</exclude>
                <exclude>META-INF</exclude>
            </excludes>
        </unpackOptions>
        <scope>runtime</scope>
    </dependencySet>
    <dependencySet>
        <outputDirectory>jars</outputDirectory>
        <useProjectArtifact>false</useProjectArtifact>
        <includes>
            <include>eu.els.inneo.tools:compare-files-xml</include>
            <include>eu.els.inneo.tools:compare-files-diff</include>
        </includes>
        <unpack>false</unpack>
        <scope>runtime</scope>
    </dependencySet>
</dependencySets>

eu.els.inneo.tools:compare-files-shells is a jar packaging the contains only shell files (bash and config files), and I want them to be runnable by everyone.

Building this tar.gz, shell files are 644.

Any help will be much appreciated.

Christophe


回答1:


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

Solved in 3.0.0-SNAPSHOT



来源:https://stackoverflow.com/questions/39592495/maven-assembly-plugin-do-not-set-file-attributes

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