[英]Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project dbproxy:
I'm getting the following errors when starting an app:启动应用程序时出现以下错误:
Error:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.091 s
[INFO] Finished at: 2019-11-29T09:36:53Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project dbproxy: Fatal error compiling: error: invalid target release: 13.0.1 -> [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
Makefile:53: recipe for target '/root/hue/desktop/libs/librdbms/java-lib/dbproxy-1.0.jar' failed
make[2]: *** [/root/hue/desktop/libs/librdbms/java-lib/dbproxy-1.0.jar] Error 1
make[2]: Leaving directory '/root/hue/desktop/libs/librdbms'
Makefile:106: recipe for target '.recursive-env-install/libs/librdbms' failed
make[1]: *** [.recursive-env-install/libs/librdbms] Error 2
make[1]: Leaving directory '/root/hue/desktop'``
Makefile:148: recipe for target 'desktop' failed
make: *** [desktop] Error 2
mvn --version Apache Maven 3.6.0 Maven home: /usr/share/maven Java version: 13.0.1, vendor: Oracle Corporation, runtime: /usr/local/java Default locale: en, platform encoding: UTF-8 OS name: "linux", version: "4.15.0-52-generic", arch: "amd64", family: "unix" mvn --version Apache Maven 3.6.0 Maven 主页:/usr/share/maven Java 版本:13.0.1,供应商:Oracle Corporation,运行时:/usr/local/java 默认语言环境:en,平台编码:UTF-8 OS名称:“linux”,版本:“4.15.0-52-generic”,arch:“amd64”,系列:“unix”
openjdk 13.0.1 2019-10-15 OpenJDK Runtime Environment (build 13.0.1+9) OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing) openjdk 13.0.1 2019-10-15 OpenJDK Runtime Environment (build 13.0.1+9) OpenJDK 64-Bit Server VM (build 13.0.1+9,混合模式,共享)
Please help me to resolve the issue.请帮我解决这个问题。
Your error says你的错误说
Fatal error compiling: error: invalid target release: 13.0.1编译致命错误:错误:无效目标版本:13.0.1
You are using maven-compiler-plugin
3.0 however you need at least 3.8 to work with Java 13. This can be done with <plugin>
tag, although you probably should consider updating Maven to 3.5:您使用的是maven-compiler-plugin
3.0,但是您至少需要 3.8 才能使用 Java 13。这可以使用<plugin>
标记来完成,尽管您可能应该考虑将 Maven 更新到 3.5:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>13</source>
<target>13</target>
</configuration>
</plugin>
Take a look at this article to see what else is needed to work with Java 13.看看这篇文章,了解使用 Java 13 还需要什么。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.