You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/10/13 15:26:03 UTC
(maven-gh-actions-shared) 01/01: Activate run-its on Maven 3, which has no optional profiles
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch agent/v5-optional-its-maven3
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git
commit 2060bde7f4698fcf5f80492cb97927d5abd4a586
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Tue Oct 13 17:25:51 2026 +0200
Activate run-its on Maven 3, which has no optional profiles
Maven 3.9 and 3.10 read -P ?run-its as a profile named ?run-its and leave run-its off, so the ITs were skipped; for Maven 3 the build steps now drop the ? before running.
---
.github/workflows/maven-verify.yml | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 86897cd..bafd075 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -399,7 +399,15 @@ jobs:
echo "$bin" >> "$GITHUB_PATH"
- name: Build with Maven
- run: mvn --errors --batch-mode --show-version ${{ inputs.maven-args }} ${{ inputs.ff-goal }}
+ shell: bash
+ env:
+ MAVEN_VERSION: ${{ needs.setup-maven-version.outputs.version }}
+ ARGS: ${{ inputs.maven-args }}
+ GOAL: ${{ inputs.ff-goal }}
+ run: |
+ # Maven 3 has no optional profiles: it reads "?run-its" as a profile of that name and leaves run-its off
+ if [[ "$MAVEN_VERSION" == 3.* ]]; then GOAL="${GOAL//\?run-its/run-its}"; fi
+ eval "mvn --errors --batch-mode --show-version $ARGS $GOAL"
- name: Build Maven Site
run: mvn --errors --batch-mode --show-version ${{ inputs.maven-args }} ${{ inputs.ff-site-goal }}
@@ -595,7 +603,15 @@ jobs:
- name: Build with Maven
if: steps.should-run.conclusion == 'success'
- run: mvn --errors --batch-mode --show-version ${{ inputs.maven-args }} ${{ inputs.verify-goal }}
+ shell: bash
+ env:
+ MAVEN_VERSION: ${{ matrix.maven || needs.setup-maven-version.outputs.version }}
+ ARGS: ${{ inputs.maven-args }}
+ GOAL: ${{ inputs.verify-goal }}
+ run: |
+ # Maven 3 has no optional profiles: it reads "?run-its" as a profile of that name and leaves run-its off
+ if [[ "$MAVEN_VERSION" == 3.* ]]; then GOAL="${GOAL//\?run-its/run-its}"; fi
+ eval "mvn --errors --batch-mode --show-version $ARGS $GOAL"
- name: Upload artifact on failure
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2