I am using maven-assembly-plugin to collect some files and folders in a .tar.gz file. In my target directory, I have some folders with these names (for example):
lib-oracle lib-mysql lib-sqlserver . .
and each folder contains some jar files.
I want to copy these folders (and also contents of them) into a final .tar.gz file. I know I can copy them separately like this:
<fileSet>
<directory>target/lib-oracle</directory>
<outputDirectory>lib-oracle</outputDirectory>
</fileSet>
but I'm interested to know if there is any way to copy them all together?
maybe something like this:
<fileSet>
<directory>target/lib*</directory>
</fileSet>
finally I was successful to do it:
<fileSet>
<directory>target</directory>
<includes>
<include>lib*/*</include>
</includes>
<outputDirectory>/</outputDirectory>
</fileSet>
You can do
<fileSet>
<directory>target/</directory>
<outputDirectory>lib-oracle</outputDirectory>
</fileSet>`
Even this will allow you to get all the data from inside target folder.
You can use:
<fileSet>
<directory>target</directory>
<includes>
<include>lib-oracle/**</include>
<outputDirectory>/</outputDirectory>
</includes>
</fileSet>
'**' indicates all the files in the current folder and all the files in the subfolders of the current folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With