Tri*_*ate 2 maven spring-boot bitbucket-pipelines java-11
构建失败并显示“无效目标版本:11”消息。
提交到 bitbucket 后,管道作业会自动启动,但失败并显示
Full Error Message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project sms-commons: Fatal error compiling: invalid target release: 11 ->
Run Code Online (Sandbox Code Playgroud)
如何启用 java 11 支持?
image: maven:3.3.9
pipelines:
default:
- step:
caches:
- maven
script: # Modify the commands below to build your repository.
- mvn -B verify # -B batch mode makes Maven less verbose
- mvn clean install
Run Code Online (Sandbox Code Playgroud)
我期望构建成功,但正如我所写,构建作业失败了。
您需要使用较新版本的maven编译器插件
org.apache.maven.plugins maven-compiler-plugin 3.8.0
并且您需要一个提供 java 11 的 maven Docker 映像,例如 maven:3-jdk-11
| 归档时间: |
|
| 查看次数: |
5914 次 |
| 最近记录: |