I have a simple java maven project. One of my classes when executing needs to load an xml configuration file from the classpath. I don\'t want to package such xml file when
If your packaging is war, you can use the packagingExcudes configuration option of the maven-war-plugin:
...
...
maven-war-plugin
3.2.2
WEB-INF/classes/abc.properties
...
...
Use commas to separate between multiple resources you want to exclude. Also, you can use wildcards and regex in your excluded paths. For regex, it's in the %regex[YOUR_REGEX_HERE] syntax. Check the documentation for more details.