ビルドをパッケージ化するために maven-assembly-plugin を使用しています。
ファイル セットのコピーを実行し、ファイルのアクセス許可を変更することはできますが、ディレクトリのアクセス許可を変更することはできません。ドキュメントから、気になるディレクトリで使用しようとしています。ただし、指定したパーミッションに関係なく、ディレクトリは常に現在の umask (0022) に基づいて作成されます。Mavenビルド中にこの方法でディレクトリのアクセス許可を変更するクリーンな方法を知っている人はいますか? 機能するのは だけですがumask 0
、このプロジェクトに取り組んでいる全員がこのセットを持っている必要があるため、これを強制されることはありません。
maven assembly.xml の例:
<?xml version="1.0"?>
<assembly>
<id>zip-with-dependencies</id>
<formats>
<format>dir</format>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<dependencySets>
<dependencySet>
<includes>
<include>foo:bar</include>
</includes>
<outputDirectory>/resources/blah</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<unpack>true</unpack>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${basedir}/src/main/web</directory>
<includes>
<include>some_dir</include>
</includes>
<outputDirectory>web</outputDirectory>
<fileMode>0777</fileMode>
<directoryMode>0777</directoryMode>
</fileSet>
</fileSets>
</assembly>