My target directory has main sub-folders and I don't want those sub-folders be included in my package, only their contents (folders and files they consist of).
For example, this is my target folder:
targetFolder
-subfolder1
-subfolder2
Currently, I am using Maven-Jar-Plugin but I don't know how I will be able to package my jar as structured below.
from subfolder1, include only base/**/*files1.*
from subfolder2, include only base/**/*files2.*
For that one, i tried doing this but it did not result to a jar structure that I want.
<include>subfolder1/base/**/*files1.*</include>
<include>subfolder2/base/**/*files2.*</include>
This is considering that both folders have similar structure
By doing so, the result jar when opened would look like:
subfolder1
- -base
- - -sub1
- - - -sub2
- - - - -sub3
- - - - - -subfolder1files1.class
subfolder2
- -base
- - -sub1
- - - -sub2
- - - - -sub3
- - - - - -subfolder2files2.class
I want my jar package to look like this:
base
-sub1
- -sub2
- - -sub3
- - - -subfolder1files1.class
- - - -subfolder2files2.class
This is just an example but I hope I have shown the situation of my target folder where I have plenty sub-folders and I have filters to include in the jar package for each of the target sub-folders.