The Compiler Plugin is used to compile the sources of your project.
# compiler创建用来编译项目源码
Since 3.0, the default compiler is javax.tools.JavaCompiler (if you are using java 1.6)
and is used to compile Java sources.
# 从3.0版本开始,maven默认使用javax.tools.JavaCompiler编译项目
If you want to force the plugin using javac, you must configure the plugin option
forceJavacCompilerUse.
# 如果要使用jdk提供的javac进行编译,可以用参数forceJavacCompilerUse
Also note that at present the default source setting is 1.6 and the default target setting
is 1.6, independently of the JDK you run Maven with
# 编译项目source、target都是1.6版本,和运行maven时使用的jdk版本无关
compiler goal
# compiler:compile
is bound to the compile phase and is used to compile the main source files
# 和compile阶段绑定,用来编译main source文件
# compiler:testCompile
is bound to the test-compile phase and is used to compile the test source files
# 和test-compile绑定,用来编译test source文件