I want to know if it is possible to exclude some resources from my maven project to be bundled within the jar file, either using the assembly or shade plugin. Note that I can do this by putting in the build DOM node:
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**</exclude>
</excludes>
<filtering>false</filtering>
</resource>
</resources>
but I'm looking for something else, as this screws up my eclipse setup.
PS:For instance I want to exclude the whole src/main/resources/config folder from the jar and instead copy it in the target folder. To copy I use maven-resource-plugin, but can't exclude it.
You could put the excluded resources in src/main/config
instead of src/main/resources/config
and configure the maven-resources-plugin
accordingly. Per convention, the resources directory is for resources which go into the Jar file. It is OK to create your own directories under src/main
for unconventional usages.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments