有效解决办法:marven:Fatal error compiling: 无效的目标发行版: 11
Posted 柳鲲鹏
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了有效解决办法:marven:Fatal error compiling: 无效的目标发行版: 11相关的知识,希望对你有一定的参考价值。
具体错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project teavm-tests: Fatal error compiling: 无效的目标发行版: 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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :teavm-tests
打开对应的pom.xml,有如下内容:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java-tests.version}</source>
<target>${java-tests.version}</target>
</configuration>
</plugin>
把source/target改为1.8是不对的。在pom.xml中应该有类似如下的配置:
<java.version>1.8</java.version>
<java-tests.version>11</java-tests.version>
吾把11改成1.8,就报一些接口找不到。所以,吾解决办法是提高了java.version。
以上是关于有效解决办法:marven:Fatal error compiling: 无效的目标发行版: 11的主要内容,如果未能解决你的问题,请参考以下文章
关于win10系统安装vivado 2017.1 .2 .3 报runtime error 问题解决办法 亲测有效
PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:fre(