Maven compiler plugin null pointer


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project ProjectName: Fatal error compiling: CompilerException: NullPointerException -> [Help 1]

原因:代码编译出错被掩盖了


The underlying problem is usually caused by a compiler error that gets masked. To find out the compiler error,
pass -Dmaven.compiler.forceJavacCompilerUse=true to the mvn command line.
After fixing the compiler error, the problem goes away.

在pom里增加true 找出错误原因,修改后再编译




org.apache.maven.plugins
maven-compiler-plugin
3.8.1

1.8
1.8
true