Frequently Asked Questions
- What are resources?
-
Resources are non-source code files used by your project. Examples of these are properties files, images and XML files.
- When should I use the Resources Plugin's goal outside a lifecycle?
-
The Maven Resource Plugin simply copies resources from your source to your build output (with optional filtering). So if that's the only operation you are interested in, you can skip the other phases such as compilation and testing and simply do
mvn resources:resources
For example, if you just debugged your configuration file and you want to manually test it in your container if it works, you can simply do
mvn resources:resources
This will produce those configuration files on your output thus skipping the other phases which may eat up a huge amount of your time.
- Do my main resources go to my test resources as well?
-
No. Your main resources and your test resources are separated from each other.
Your test resources should only be used by your tests. Thus, they are separated from the main to avoid any side effects that may occur.
- What encoding values are allowed?
-
The Maven Resource Plugin only allows encoding values representing the charsets supported by the Java platform, namely
US-ASCII
,ISO-8859-1
,UTF-8
,UTF-16BE
,UTF-16LE
andUTF-16
.