I have a directory in a dependency, that I want copied in src/main/webapp/mypath during the initialize phase. But I want it to be copied exactly and only once, meaning that:
I tried a couple of approaches with copy-resources and dependency:unpack but maven will always overwrite if mypath coming from the dependency is newer / updated even if I set to false every possible overwrite* configuration I'm aware of.
Any advice or RTFM + link to a manual I didn't read so far?
You can use profiles:
<profiles>
<profile>
<activation>
<file>
<missing>src/main/webapp/mypath</missing>
</file>
</activation>
... copy ...
</profile>
</profiles>