Exclude directory contents with maven rpm plugin
I am creating a pom file with multiple mappings. I am trying to combine various functions into one neat package of mappings and I am having some problems reading it some functions as well as permissions.
The directory structure looks like this:
/conf /folder1 /folder2 /folder3 /bin
I can get the cart correctly using the following setup:
<mapping>
<directory>/opt/bin</directory>
<filemode>755</filemode>
<username>myUser</username>
<groupname>myUser</groupname>
<sources>
<source>
<location>bin</location>
</source>
<sources>
</mapping>
What I want to accomplish is put all confs in / opt / conf in the same structure with the same permissions. However, I have an assembly plugin that takes content from folder2 and zips them up. I want to loop through the contents of folder2 in the mapping and then include the zip file in the folder when unpacking it. So I will have / opt / folder 2 / contents.zip
Here are my attempts at matching for this, but they don't read correctly:
<mapping>
<directory>/opt/conf</directory>
<filemode>755</filemode>
<username>myUser</username>
<groupname>myUser</groupname>
<sources>
<source>
<location>conf</location>
<excludes>
<exclude>folder2</exclude>
</excludes>
</source>
</sources>
</mapping>
<mapping>
<directory>/opt/conf/folder2</directory>
<filemode>755</filemode>
<username>myUser</username>
<groupname>myUser</groupname>
<sources>
<source>
<location>target</location>
<includes>
<include>*.zip</include>
</includes>
</source>
</sources>
</mapping>
+2
source to share