如何在 bitbucket 上设置基于 java 11 的 spring 引导管道?
How to setup a java 11 based spring boot pipeline on bitbucket?
构建失败并显示“无效的目标版本: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 ->
如何启用 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
我希望构建成功,但正如我所写,构建作业失败了。
您需要使用较新版本的 maven Compiler Plugin
org.apache.maven.plugins
maven编译器插件
3.8.0
并且您需要一个提供 java 11 的 Maven Docker 图像,例如 maven:3-jdk-11
我使用:ehsaniara/bitbucket-util
作为 Docker Image。
示例:
options:
docker: true
pipelines:
branches:
master:
- step:
name: Production Build on Master
image: ehsaniara/bitbucket-util:latest
trigger: automatic
script:
- mvn clean install
您需要支持 jdk 11 的 Maven 图像,因此请像下面这样更新您的“图像”值:
image: maven:3.8.3-jdk-11
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
构建失败并显示“无效的目标版本: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 ->
如何启用 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
我希望构建成功,但正如我所写,构建作业失败了。
您需要使用较新版本的 maven Compiler Plugin
org.apache.maven.plugins maven编译器插件 3.8.0
并且您需要一个提供 java 11 的 Maven Docker 图像,例如 maven:3-jdk-11
我使用:ehsaniara/bitbucket-util
作为 Docker Image。
示例:
options:
docker: true
pipelines:
branches:
master:
- step:
name: Production Build on Master
image: ehsaniara/bitbucket-util:latest
trigger: automatic
script:
- mvn clean install
您需要支持 jdk 11 的 Maven 图像,因此请像下面这样更新您的“图像”值:
image: maven:3.8.3-jdk-11
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