SpringBoot MAVEN编译报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:

时间:2021-04-16 17:18:07

参考了好几篇文章没搞定,直到查询错误关键字

An unknown compilation problem occurred 

分别参考了以下博客:

https://blog.csdn.net/fanrenxiang/article/details/80864908

https://blog.csdn.net/weixin_42167717/article/details/80377123

最后搞定的是这篇

https://my.oschina.net/u/170632/blog/857078

An unknown compilation problem occurred 

maven 编译项目遇到

里面我引用了jdk的jar,遇到上面那个报错

<plugin>
   <artifactId>maven-compiler-plugin</artifactId>
   <version>3.6.0</version>
   <configuration>
      <source>1.8</source>
      <target>1.8</target>
      <encoding>UTF-8</encoding>
      <compilerArguments>
         <verbose />
         <!-- 要注意 win是冒号,linux/Mac OS是分号,-->
         <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
      </compilerArguments>
   </configuration>
</plugin>

注意代码中的文字,就是解决办法