SpringBoot MAVEN編譯報錯Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:

參考了好幾篇文章沒搞定,直到查詢錯誤關鍵字java

An unknown compilation problem occurred 

分別參考瞭如下博客:linux

http://www.javashuo.com/article/p-zehdklpt-gh.htmlmaven

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

最後搞定的是這篇.net

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

An unknown compilation problem occurred 

maven 編譯項目遇到blog

裏面我引用了jdk的jar,遇到上面那個報錯get

<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>

注意代碼中的文字,就是解決辦法博客

相關文章
相關標籤/搜索