I am creating a pom file with multiple mappings. I am trying to combine different functions into one neat package of mappings and I am having some trouble getting it to read some of the functions as well as pass permissions properly.
The directory structure is as follows:
/conf
/folder1
/folder2
/folder3
/bin
I can get bin to map properly 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 to put all of conf into /opt/conf exactly the same structure with the same permissions. However I have an assembly plugin that takes contents from folder2 and zips them up. I want to skip the contents of folder2 in the mapping, and then include the zip file in the folder when it unwraps. So I will have /opt/folder2/contents.zip
Here are my attempted mappings for that, but they are not reading properly:
<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>