Closed ghoshbishakh closed 1 day ago
Hello @ghoshbishakh, Thank you for creating this issue and we will look into it :)
Hi @ghoshbishakh, To use Maven version 3.9.9 alongside JDK 17, Maven needs to be manually installed since the ubuntu-latest runner image comes with Maven 3.8.8 by default. For reference, please visit https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md. Here is an updated workflow configuration:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install latest Maven
run: |
MAVEN_VERSION=3.9.9
wget https://downloads.apache.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz
tar xzvf apache-maven-$MAVEN_VERSION-bin.tar.gz
sudo mv apache-maven-$MAVEN_VERSION /opt/maven
sudo rm -f /usr/bin/mvn # Remove existing symbolic link if it exists
sudo ln -s /opt/maven/bin/mvn /usr/bin/mvn # Create new symbolic link
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- run: mvn --version
Thanks a lot @gowridurgad . I will try it out.
Description:
After setting up JDK 17, the maven version we get is
3.8.8
We want to get the latest maven version,3.9.x
Here is the workflow:
Task version: v4
Platform:
Runner type: