Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile報錯

今天在打包dubbo-admin的時候,報了這個錯誤

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project dubbo-monitor-simple: Compilation failure -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :dubbo-monitor-simple

我使用的打包命令是:

mvn clean package -Dmaven.test.skip=true

剛開始我以爲是網絡的錯誤,我又嘗試了幾次,還是失敗。
不說這麼多廢話了,解決方法,打開pom.xml文件,修改JDK的版本。

在這裏插入圖片描述
根據自己電腦上的JDk版本來修改,我在github上下載的時候,它的默認版本是1.6.
在這裏插入圖片描述
BUILD SUCCESS!!!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章