错误无法在项目 code-with-quarkus 上执行目标 io.quarkus:quarkus-maven-plugin:1.13.2.Final:dev (default-cli):

问题描述

当我使用命令 mvn clean quarkus: dev 时,我从 intellij 的终端得到以下响应:

E:\api-hard-lot>mvn clean quarkus:dev
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.acme:code-with-quarkus >---------------------
[INFO] Building code-with-quarkus 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ code-with-quarkus ---
[INFO] Deleting E:\api-hard-lot\target
[INFO]
[INFO] --- quarkus-maven-plugin:1.13.2.Final:dev (default-cli) @ code-with-quarkus ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] copying 1 resource
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 31 source files to E:\api-hard-lot\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.052 s
[INFO] Finished at: 2021-04-25T12:02:55-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.13.2.Final:dev (default-cli) on project code-with-quarkus: Fatal error
compiling: invalid target release: 11 -> [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/MojoExecutionException

'cmd' 不被识别为内部命令 或外部、可运行的程序或批处理文件

解决方法

谢谢大家,这正是我的解决方案,我改成了 jdk 8 和

在pom中 1.81.8 和 在代码与夸克

,

您的项目是使用 JDK 11 创建的,因此当您尝试使用低于 11 的 JDK 构建它时,要求使用 JDK 11。

更新您的 JDK(推荐)或调整您的项目以与 JDK 8 兼容(将 pom 文件中出现的 11 替换为 1.8)。