4

How to fail on maven copy-resources instead skip non existing resourceDirectory when perform maven-resources-plugin:copy-resources

I have config as descibed here:

http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html

[INFO] 
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-root-configuration-files) @ replicator ---
[INFO] Using 'uft-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory ....
[INFO] 

How to fail instead skipping non existing resourceDirectory?

qwazer
  • 7,174
  • 7
  • 44
  • 69

1 Answers1

4

The resource plugin doesn't help you there. Try the http://maven.apache.org/plugins/maven-verifier-plugin/ instead or the enforcer plugin with requireFilesExist

The latter works better for multi-module builds if you want the same check for every module. Just add the check to the parent POM.

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • To add to this, make sure your packages are named correctly. A simple `Test` -> `test` naming change of my package fixed this issue for me. (It had only happened after migrating from a Mac agent to a Linux agent) – Mark Han Jan 31 '20 at 03:54