我已经使用下面的任务安装了 openjdk 16。
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- script: |
wget https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz
pwd
ls -lRt
displayName: 'Download jdk'
- task: JavaToolInstaller@0
inputs:
versionSpec: '16'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'LocalDirectory'
jdkFile: 'OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz'
jdkDestinationDirectory: '/opt/jdkcustom'
cleanDestinationDirectory: true
- script: |
java -version
ls -lRt
pwd
ls $(Pipeline.Workspace)
我按照步骤 1 下载了 jdk,然后按照步骤 2 “JavaToolInstaller@0” 进行了安装
我没有找到适合 maven 的,有人可以建议一下吗?