In a Maven project, I have directory, which I need the content from..
${basedir}/target/webapp-SNAPSHOT/WEB-INF/vendorspace/
|- dealo
|-static
|- css
|- images
|- js
|- blog
|- static
|-css
|-images
|-js
------
And I want to copy the content of static directory to its parent directory as
${basedir}/target/tstatic/
|- dealo
|- css
|- images
|- js
|- blog
|-css
|-images
|-js
One solution is to give name of the folder like this:
<copy todir="${basedir}/target/vstatic/dealo">
<fileset dir="${basedir}/target/webapp-SNAPSHOT/WEB-INF/vendorspace/dealo/static/" includes="**/*" />
</copy>
<copy todir="${basedir}/target/vstatic/blog">
<fileset dir="${basedir}/target/webapp-SNAPSHOT/WEB-INF/vendorspace/blog/static/" includes="**/*" />
</copy>
but I have 10's of those folders and it will grow in future so don't want to give hard-coded name
Related question: Maven : copy files without subdirectory structure but it is copying only files, I need to copy the sub-directories inside "static" directory with its content