How to unpack files from a sub-folder into a target folder?
Example:
My package includes ThisFolder
and ThatFolder
, I just want to unpack the folders and files from ThisFolder
into the target directory, not the folder Thisfolder
itself.
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack_this</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>initialize</phase>
<configuration>
<includeArtifactIds>ZipFile</includeArtifactIds>
<includes>ThisFolder/**</includes>
<stripVersion>true</stripVersion>
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
In this example I'm almost there, but ThisFolder
is included. If I try to use:
<excludes>ThisFolder</excludes>
it just doesn't work. Is there a solution to do this?