1.Apache Maven Resources Plugin
官网对该插件的详解见官方文档地址
The Resources Plugin handles the copying of project resources to the output directory. There are two different kinds of resources: main resources and test resources. The difference is that the main resources are the resources associated to the main source code while the test resources are associated to the test source code.
该插件的作用 主要是处理将 主程序与 测试程序所需的源文件复制到输出编译文件夹中。
2.使用场景
2.1 指定源文件编译的字符编码
a.第一种方式在properites设置
<project ...>
...
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
...
</properties>
..
</project>
b.在构建路径中指定
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
...
<encoding