From e6f5fe8ab7914241921bdb4a7474c70cff9439ac Mon Sep 17 00:00:00 2001 From: Prajith <92932158+prajithp13@users.noreply.github.com> Date: Thu, 9 Oct 2025 14:11:51 +0530 Subject: [PATCH 1/2] Update action.yml --- action.yml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 19cb6f2..c1451f7 100644 --- a/action.yml +++ b/action.yml @@ -10,7 +10,7 @@ inputs: default: 'zulu' maven_version: description: 'The maven version to use' - default: '3.8.3' + default: '3.9.11' maven_flag: description: 'The maven flag to use' default: '-T 4C -B --no-transfer-progress' @@ -31,7 +31,9 @@ inputs: description: 'The Amazon Resource Name (ARN) of the role to assume. This is required for s3 cache' default: '' required: false - + enabled_build_cache: + description: 'This enables build-cache extension https://maven.apache.org/extensions/maven-build-cache-extension' + default: 'false' outputs: version: description: 'The version of the artifact' @@ -60,7 +62,9 @@ runs: AWS_REGION: ap-south-1 RUNS_ON_S3_BUCKET_CACHE: "ct-github-action-cache" with: - path: ~/.m2/repository + path: | + ~/.m2/repository + ~/.m2/build-cache key: ${{ runner.os }}-maven restore-keys: | ${{ runner.os }}-maven @@ -68,10 +72,27 @@ runs: uses: actions/cache@v4 if: ${{ inputs.aws_role_arn == '' }} with: - path: ~/.m2/repository + path: | + ~/.m2/repository + ~/.m2/build-cache key: ${{ runner.os }}-maven restore-keys: | ${{ runner.os }}-maven + + - name: Enable Maven build cache extension + if: ${{ inputs.enabled_build_cache == 'true' }} + run: | + mkdir -p .mvn + cat > .mvn/extensions.xml <<'EOF' + + + org.apache.maven.extensions + maven-build-cache-extension + 1.2.0 + + + EOF + - name: Set up Maven uses: stCarolas/setup-maven@v5 with: From 177d8d6cd2dcf71cbacdd963b0dc1b3bd289c2da Mon Sep 17 00:00:00 2001 From: Prajith <92932158+prajithp13@users.noreply.github.com> Date: Thu, 9 Oct 2025 14:18:05 +0530 Subject: [PATCH 2/2] Update action.yml --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index c1451f7..1360f69 100644 --- a/action.yml +++ b/action.yml @@ -81,6 +81,7 @@ runs: - name: Enable Maven build cache extension if: ${{ inputs.enabled_build_cache == 'true' }} + shell: bash run: | mkdir -p .mvn cat > .mvn/extensions.xml <<'EOF'