I have the following directory structure:
MyProject/
- temp/
- cat_A/
- tmp/
- file_A
- cat_B/
- tmp/
- file_B
I am using maven-assembly-plugin. I want to create a tar.gz file with the content to be like following:
output/
- cat_A/
- file_A
- cat_B/
- file_B
I tried to make a custom descriptor as following:
<assembly …>
<id>my-result</id>
<formats>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.baseDir}/temp</directory>
<outputDirectory>output</outputDirectory>
<!-- tried to exclude tmp/ folder-->
<excludes>
<exclude>${project.baseDir}/temp/cat_A/tmp</exclude>
<exclude>${project.baseDir}/temp/cat_B/tmp</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
But the final output still contains the tmp/ folder.
How to exclude the tmp/
folder and achieve the result I want?