您当前的位置: 首页 >  ar

柳鲲鹏

暂无认证

  • 0浏览

    0关注

    4642博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

有效解决办法:marven:Fatal error compiling: 无效的目标发行版: 11

柳鲲鹏 发布时间:2021-05-28 16:10:56 ,浏览量:0

具体错误:

[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  -rf :teavm-tests

打开对应的pom.xml,有如下内容:

       
          org.apache.maven.plugins
          maven-compiler-plugin
          ${maven-compiler-plugin.version}
          
            ${java-tests.version}
            ${java-tests.version}
          
        

把source/target改为1.8是不对的。在pom.xml中应该有类似如下的配置:

    1.8
    11

吾把11改成1.8,就报一些接口找不到。所以,吾解决办法是提高了java.version。

关注
打赏
1665724893
查看更多评论
立即登录/注册

微信扫码登录

0.0816s