Usage – Apache Maven Resources Plugin (original) (raw)
The Resources Plugin handles the copying of project resources to the output directory. The following examples describe the basic usage of the Plugin.
To handle filtering this version of Maven Resources Plugin uses Maven Filtering $mavenFilteringVersion.
Copy resources for the main source code
mvn resources:resourcesUpon executing this command, the resources for your main source code, as specified by the element, will be copied to your main build output directory. This does not affect the resources for your test code.
Moreover, this goal is bound to the process-resources phase.
Copy resources for the unit tests
mvn resources:testResourcesLike the first goal this goal copies resources, but this time for your test source code to your test build output directory, as specified by the element. Also, this does not affect the resources for the main source code.
Furthermore, this is bound to the process-test-resources phase.
Copy resources specified by a configuration element
mvn resources:copy-resourcesRather than using the or elements or their defaults, this uses a element that is specified as part of the plugin configuration.
See the examples for how to configure this. See the Maven Model for how to write elements.