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里增加<forceJavacCompilerUse>true</forceJavacCompilerUse> 找出错误原因,修改后再编译
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.8</source> <target>1.8</target> <forceJavacCompilerUse>true</forceJavacCompilerUse> </configuration> </plugin> </plugins> </build>
标签:maven,plugin,true,1.8,Maven,error,pointer,compiler 来源: https://www.cnblogs.com/sidesky/p/16336594.html