How to set file permissions recursively with Maven Assembly plugin when including a directory?

82 Views Asked by At

I'm including a whole directory with maven-assembly-plugin, the config looks like this:

<fileSets>
    <fileSet>
        <directory>src/main/mydir</directory>
        <outputDirectory>/</outputDirectory>
        <excludes>
            <exclude>bin</exclude>
        </excludes>
    </fileSet>
    <fileSet>
        <directory>src/main/mydir/bin</directory>
        <outputDirectory>/bin</outputDirectory>
        <fileMode>770</fileMode>
        <directoryMode>777</directoryMode>
    </fileSet>
</fileSets>

I expected that it will set 770 mode for all the files inside /bin directory in the artifact, but it actually sets the default 644 mode and only mode of directory itself is affected. Is there any way to tell Maven to set mode for everything inside a specific directory without using big workarounds?

0

There are 0 best solutions below