Reputation: 487
I am converting our ant build to maven using eclipse STS m2e. Now I have a problem:
I have a mapping folder under src/main/resources
like below:
and the mapping folder has some .xml files.
Now I want to copy all the .xml files under mapping folder to WEB-INF/classes
folder in the final WAR and for that I did this:
<resources>
...
<resource>
<directory>${basedir}\src\main\resources</directory>
</resource>
<resource>
<directory>${basedir}\src\main\resources\mapping</directory>
</resource>
...
</resources>
By doing this it is also creating a mapping folder in the WAR under WEB-INF/classes
. How can I exclude this mapping folder, as all the contents are already added under WEB-INF/classes
path directly.
Please Help.
Upvotes: 1
Views: 1172
Reputation: 4599
<resource>
<directory>${basedir}/src/main/resources</directory>
<excludes><exclude>mapping/</exclude></excludes>
</resource>
<resource>
<directory>${basedir}/src/main/resources/mapping</directory>
</resource>
Upvotes: 2