I have installed adopt openjdk 16 using the task below.
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)
I download the jdk with step 1 and installed it using step 2 "JavaToolInstaller@0"
I didn't find such for maven, can anyone please suggest.
0 Answers