I have a very specific requirement of our build infrastructure for copying some content of another JAR dependency to a specific subfolder of my web application. We use the maven-assembly-plugin, and the natural way to do this is to use <dependencySet>with <unpackOptions>.
Sample code (in assembly descriptor) I look like this:
<dependencySet>
<unpack>true</unpack>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>my.group:artifact:jar</include>
</includes>
<unpackOptions>
<includes>
<include>subfolder/config.xml</include>
</includes>
</unpackOptions>
<outputDirectory>WEB-INF/otherfolder</outputDirectory>
</dependencySet>
The problem is that I cannot figure out how to indicate that I want to copy only one file artifact.jar/subfolder/config.xmlto the target WEB-INF/otherfolder. Actual result WEB-INF/otherfolder/subfolder/config.xml. As you can see, it is /subfolderadded to the final path. Is there a way to change the expression <include>so that it is /subfoldernot added?
Thanks in advance!