I would like copy just “file.xml” without folder structure using overlays like this:
<overlays>
<overlay>
<groupId>com.mygroup</groupId>
<artifactId>my_comp</artifactId>
<includes>
<include>WEB-INF/folder1/folder2/file.xml</include>
</includes>
<targetPath>WEB-INF/otherFolder</targetPath>
<type>war</type>
</overlay>
</overlays>
In other words: copy file.xml from WEB-INF/folder1/folder2/ and place to the WEB-INF/otherFolder
Any ideas?
To my knowledge, this is not possible with overlays, the content of the overlay is added “as is” to the targetPath (that defaults to the root structure of the webapp).
If you want to make file.xml available at another location, you’ll have to tweak its location in
my_compWAR before the overlay.