This is an automated email from the ASF dual-hosted git repository.
Croway pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new 3d16c2a72aa6 ci: pass maven-extra-args to incremental build for JDK 17
enforcer skip
3d16c2a72aa6 is described below
commit 3d16c2a72aa66e15db45033f5a7ec6c795454a8f
Author: Croway <[email protected]>
AuthorDate: Tue Apr 21 13:51:51 2026 +0100
ci: pass maven-extra-args to incremental build for JDK 17 enforcer skip
---
.github/actions/incremental-build/action.yaml | 5 +++++
.github/actions/incremental-build/incremental-build.sh | 15 ++++++++-------
.github/workflows/pr-build-main.yml | 1 +
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/.github/actions/incremental-build/action.yaml
b/.github/actions/incremental-build/action.yaml
index 0166f9d3aad1..78812d8f726b 100644
--- a/.github/actions/incremental-build/action.yaml
+++ b/.github/actions/incremental-build/action.yaml
@@ -39,6 +39,10 @@ inputs:
description: 'Suffix for artifacts stored'
required: false
default: ''
+ maven-extra-args:
+ description: 'Extra Maven arguments to pass to the build (e.g.
-Denforcer.phase=none)'
+ required: false
+ default: ''
runs:
using: "composite"
steps:
@@ -52,6 +56,7 @@ runs:
MODE: ${{ inputs.mode }}
PR_ID: ${{ inputs.pr-id }}
GITHUB_REPO: ${{ inputs.github-repo }}
+ MAVEN_EXTRA_ARGS: ${{ inputs.maven-extra-args }}
shell: bash
run: ${{ github.action_path }}/incremental-build.sh ${{
steps.install-mvnd.outputs.mvnd-dir }}/mvnd $MODE $PR_ID $GITHUB_REPO
- name: archive logs
diff --git a/.github/actions/incremental-build/incremental-build.sh
b/.github/actions/incremental-build/incremental-build.sh
index 6cef654a1ca1..717b4f6bfd34 100755
--- a/.github/actions/incremental-build/incremental-build.sh
+++ b/.github/actions/incremental-build/incremental-build.sh
@@ -16,6 +16,7 @@
#
echo "Using MVND_OPTS=$MVND_OPTS"
+echo "Using MAVEN_EXTRA_ARGS=${MAVEN_EXTRA_ARGS:-}"
maxNumberOfBuildableProjects=100
maxNumberOfTestableProjects=50
@@ -96,7 +97,7 @@ function main() {
fi
if [[ ${buildAll} = "true" ]] ; then
echo "Building all projects"
- $mavenBinary -l $log $MVND_OPTS -DskipTests install
+ $mavenBinary -l $log $MVND_OPTS ${MAVEN_EXTRA_ARGS:-} -DskipTests install
ret=$?
else
local buildDependents
@@ -109,21 +110,21 @@ function main() {
for w in $pl; do
echo "$w"
done
- totalTestableProjects=$(./mvnw -q -amd exec:exec
-Dexec.executable="pwd" -pl "$pl" | wc -l)
+ totalTestableProjects=$(./mvnw -q -amd ${MAVEN_EXTRA_ARGS:-} exec:exec
-Dexec.executable="pwd" -pl "$pl" | wc -l)
fi
if [[ ${totalTestableProjects} -gt ${maxNumberOfTestableProjects} ]] ;
then
echo "Launching fast build command against the projects ${pl}, their
dependencies and the projects that depend on them"
for w in $pl; do
echo "$w"
done
- $mavenBinary -l $log $MVND_OPTS -DskipTests install -pl "$pl" -amd -am
+ $mavenBinary -l $log $MVND_OPTS ${MAVEN_EXTRA_ARGS:-} -DskipTests
install -pl "$pl" -amd -am
ret=$?
else
echo "Launching fast build command against the projects ${pl} and
their dependencies"
for w in $pl; do
echo "$w"
done
- $mavenBinary -l $log $MVND_OPTS -DskipTests install -pl "$pl" -am
+ $mavenBinary -l $log $MVND_OPTS ${MAVEN_EXTRA_ARGS:-} -DskipTests
install -pl "$pl" -am
ret=$?
fi
fi
@@ -144,7 +145,7 @@ function main() {
echo "The test-dependents label has been detected thus the projects
that depend on affected projects will be tested"
totalTestableProjects=0
else
- totalTestableProjects=$(./mvnw -q -amd exec:exec
-Dexec.executable="pwd" -pl "$pl" | wc -l)
+ totalTestableProjects=$(./mvnw -q -amd ${MAVEN_EXTRA_ARGS:-} exec:exec
-Dexec.executable="pwd" -pl "$pl" | wc -l)
fi
if [[ ${totalTestableProjects} -gt ${maxNumberOfTestableProjects} ]] ;
then
echo "There are too many projects to test so only the affected
projects are tested:"
@@ -152,7 +153,7 @@ function main() {
echo "$w"
done
# This need to install, other commands like test are not enough,
otherwise test-infra will fail due to jandex maven plugin
- $mavenBinary -l $log $MVND_OPTS install -DskipITs -pl "$pl"
+ $mavenBinary -l $log $MVND_OPTS ${MAVEN_EXTRA_ARGS:-} install
-DskipITs -pl "$pl"
ret=$?
else
echo "Testing the affected projects and the projects that depend on
them:"
@@ -160,7 +161,7 @@ function main() {
echo "$w"
done
# This need to install, other commands like test are not enough,
otherwise test-infra will fail due to jandex maven plugin
- $mavenBinary -l $log $MVND_OPTS install -DskipITs -pl "$pl" -amd
+ $mavenBinary -l $log $MVND_OPTS ${MAVEN_EXTRA_ARGS:-} install
-DskipITs -pl "$pl" -amd
ret=$?
fi
fi
diff --git a/.github/workflows/pr-build-main.yml
b/.github/workflows/pr-build-main.yml
index 17b1a2636cc1..e750ea62ab6a 100644
--- a/.github/workflows/pr-build-main.yml
+++ b/.github/workflows/pr-build-main.yml
@@ -85,6 +85,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
skip-mvnd-install: 'true'
artifact-upload-suffix: java-${{ matrix.java }}
+ maven-extra-args: ${{ matrix.maven_extra_args || '' }}
- name: mvn test parent pom dependencies changed
uses: ./.github/actions/detect-dependencies
with: