From 5300df14e7e8da8445595bfef8466e585a032d4d Mon Sep 17 00:00:00 2001 From: jycr Date: Sun, 1 Sep 2024 15:28:09 +0200 Subject: [PATCH] Migrates scripts to use Maven Wrapper (to ensure consistency of Maven version used across different environments) --- .github/workflows/_BACKUP_manual_release.yml | 6 +++--- .github/workflows/build.yml | 4 ++-- .github/workflows/tag_release.yml | 2 +- tool_build.sh | 2 +- tool_compile.sh | 2 +- tool_release_1_prepare.sh | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/_BACKUP_manual_release.yml b/.github/workflows/_BACKUP_manual_release.yml index 90818a5..0930754 100644 --- a/.github/workflows/_BACKUP_manual_release.yml +++ b/.github/workflows/_BACKUP_manual_release.yml @@ -31,9 +31,9 @@ jobs: git config user.name 'github-actions[bot]' git config user.email '' - name: Maven release - run: mvn release:prepare -B -ff -DtagNameFormat=@{project.version} + run: ./mvnw release:prepare -B -ff -DtagNameFormat=@{project.version} - name: Maven release clean - run: mvn release:clean + run: ./mvnw release:clean - name: Get last TAG run: echo "LAST_TAG=$(git tag --sort=-version:refname | head -n 1)" >> $GITHUB_ENV - name: Extract release notes @@ -44,7 +44,7 @@ jobs: with: ref: ${{ env.LAST_TAG }} - name: Build project - run: mvn -e -B clean package -DskipTests + run: ./mvnw -e -B clean package -DskipTests - name: Create release id: create_release uses: actions/create-release@v1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60db5ba..b6e2d7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: restore-keys: ${{ runner.os }}-m2 - name: Verify - run: mvn -e -B verify + run: ./mvnw -e -B verify - name: Set up JDK 17 uses: actions/setup-java@v3 @@ -57,4 +57,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_ecoCode-java + run: ./mvnw -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_ecoCode-java diff --git a/.github/workflows/tag_release.yml b/.github/workflows/tag_release.yml index b405ace..75e6e62 100644 --- a/.github/workflows/tag_release.yml +++ b/.github/workflows/tag_release.yml @@ -29,7 +29,7 @@ jobs: id: extract-release-notes uses: ffurrer2/extract-release-notes@v1 - name: Build project - run: mvn -e -B clean package -DskipTests + run: ./mvnw -e -B clean package -DskipTests - name: Create release id: create_release uses: actions/create-release@v1 diff --git a/tool_build.sh b/tool_build.sh index bfac031..a5f6a09 100755 --- a/tool_build.sh +++ b/tool_build.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh -mvn clean package -DskipTests +./mvnw clean package -DskipTests diff --git a/tool_compile.sh b/tool_compile.sh index 3d3e0d8..9d4da3c 100755 --- a/tool_compile.sh +++ b/tool_compile.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh -mvn clean compile +./mvnw clean compile diff --git a/tool_release_1_prepare.sh b/tool_release_1_prepare.sh index e87b946..7b996e3 100755 --- a/tool_release_1_prepare.sh +++ b/tool_release_1_prepare.sh @@ -5,9 +5,9 @@ ### # creation of 2 commits with release and next SNAPSHOT -mvn release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version} +./mvnw release:prepare -B -ff -DpushChanges=false -DtagNameFormat=@{project.version} sleep 2 # clean temporary files -mvn release:clean +./mvnw release:clean