Skip to content

Commit

Permalink
No issue: Download Maven 3.9.9 for the build and use it
Browse files Browse the repository at this point in the history
  • Loading branch information
reckart committed Nov 29, 2024
1 parent d9a8c09 commit 3981a7e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref }}

- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
Expand All @@ -46,15 +46,16 @@ jobs:
echo "Setting Maven environment variables..."
echo "M2_HOME=$Env:USERPROFILE\\apache-maven-3.9.9" >> $Env:GITHUB_ENV
echo "PATH=$Env:M2_HOME\\bin;$Env:PATH" >> $Env:GITHUB_ENV
- name: Set up Maven version on Linux
if: runner.os == 'Linux'
run: |
echo "Downloading Maven..."
curl -fsSL https://downloads.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz -o maven.tar.gz
tar -xzf maven.tar.gz
sudo mv apache-maven-3.9.9 /opt/maven
sudo ln -s /opt/maven/bin/mvn /usr/bin/mvn
mv apache-maven-3.9.9 $HOME/maven
echo "Adding Maven to PATH..."
echo "$HOME/maven/bin" >> $GITHUB_PATH
- name: Verify Maven version
run: mvn --version
Expand Down

0 comments on commit 3981a7e

Please sign in to comment.