This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new b9ce3e793194 CAMEL-24812: ci - do not include modules located under
src/ in the incremental build
b9ce3e793194 is described below
commit b9ce3e7931940652a92790cadbd1f12d9013bf0e
Author: Aurélien Pupier <[email protected]>
AuthorDate: Fri Oct 16 16:58:30 2026 +0200
CAMEL-24812: ci - do not include modules located under src/ in the
incremental build
pom.xml files under a module's src/ directory (src/main/resources archetype
templates, src/it fixtures) are not reactor modules and must not be selected
with -pl. Walk up to the owning module in findProjectRoot, skip files nested in
archetype-resources, and filter such paths out of the Scalpel report.
Remove the camel-salesforce-maven-plugin exclusion and manual IT mapping
which are no longer needed.
Closes #27947
Co-authored-by: IBM Bob 2.2.1
---
.github/actions/incremental-build/incremental-build.sh | 18 +++++++++++++-----
.../actions/incremental-build/manual-it-mapping.txt | 2 --
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/.github/actions/incremental-build/incremental-build.sh
b/.github/actions/incremental-build/incremental-build.sh
index 1dabf7359a22..fe96bed265a4 100755
--- a/.github/actions/incremental-build/incremental-build.sh
+++ b/.github/actions/incremental-build/incremental-build.sh
@@ -46,7 +46,7 @@ echo "Using MAVEN_EXTRA_ARGS=${MAVEN_EXTRA_ARGS:-}"
maxNumberOfTestableProjects=50
# Modules excluded from targeted testing (generated code, meta-modules, etc.)
-EXCLUSION_LIST="!:camel-allcomponents,!:dummy-component,!:camel-catalog,!:camel-catalog-console,!:camel-catalog-maven,!:camel-catalog-suggest,!:camel-route-parser,!:camel-report-maven-plugin,!:camel-endpointdsl,!:camel-componentdsl,!:camel-endpointdsl-support,!:camel-yaml-dsl,!:camel-kamelet-main,!:camel-yaml-dsl-deserializers,!:camel-yaml-dsl-maven-plugin,!:camel-jbang-core,!:camel-jbang-main,!:camel-jbang-plugin-generate,!:camel-jbang-plugin-edit,!:camel-jbang-plugin-kubernetes,!:camel
[...]
+EXCLUSION_LIST="!:camel-allcomponents,!:dummy-component,!:camel-catalog,!:camel-catalog-console,!:camel-catalog-maven,!:camel-catalog-suggest,!:camel-route-parser,!:camel-report-maven-plugin,!:camel-endpointdsl,!:camel-componentdsl,!:camel-endpointdsl-support,!:camel-yaml-dsl,!:camel-kamelet-main,!:camel-yaml-dsl-deserializers,!:camel-yaml-dsl-maven-plugin,!:camel-jbang-core,!:camel-jbang-main,!:camel-jbang-plugin-generate,!:camel-jbang-plugin-edit,!:camel-jbang-plugin-kubernetes,!:camel
[...]
# Allow projects to override the exclusion list
@@ -59,13 +59,14 @@ fi
# ── Utility functions ──────────────────────────────────────────────────
# Walk up from a file path to find the nearest directory containing a pom.xml
+# that is a real reactor module. A pom.xml located under a module's src/
directory
+# (src/it, src/main/resources, src/test/resources, ...) is a test fixture or a
+# template, not a reactor module, so keep walking up to the owning module.
findProjectRoot() {
local path=${1}
while [[ "$path" != "." ]]; do
- if [[ ! -e "$path/pom.xml" ]]; then
+ if [[ ! -e "$path/pom.xml" || "$path" == */src/* ]]; then
path=$(dirname "$path")
- elif [[ $(dirname "$path") == */src/it ]]; then
- path=$(dirname "$(dirname "$path")")
else
break
fi
@@ -314,6 +315,13 @@ runScalpelDetection() {
return
fi
+ # Ignore pom.xml fixtures/templates located under a module's src/ directory
+ # (e.g. src/it, src/main/resources): they are not part of the reactor.
+ local filtered_report="target/scalpel-report-filtered.json"
+ if jq '.affectedModules |= map(select((.path // "") |
test("/src/(main|test|it)/") | not))' "$report" > "$filtered_report"
2>/dev/null; then
+ report="$filtered_report"
+ fi
+
# Extract affected module artifactIds (colon-prefixed for Maven -pl
compatibility)
scalpel_module_ids=$(jq -r '.affectedModules[].artifactId' "$report"
2>/dev/null | sort -u | sed 's/^/:/' | tr '\n' ',' | sed 's/,$//' || true)
scalpel_module_paths=$(jq -r '.affectedModules[].path' "$report" 2>/dev/null
| sort -u | tr '\n' ',' | sed 's/,$//' || true)
@@ -762,7 +770,7 @@ main() {
local pom_files=""
for project in ${projects}; do
- if [[ ${project} == */archetype-resources ]]; then
+ if [[ ${project} == */archetype-resources || ${project} ==
*/archetype-resources/* ]]; then
continue
elif [[ ${project} != .* ]]; then
local projectRoot
diff --git a/.github/actions/incremental-build/manual-it-mapping.txt
b/.github/actions/incremental-build/manual-it-mapping.txt
index 0ba25b05ea18..042bf0cebdf1 100644
--- a/.github/actions/incremental-build/manual-it-mapping.txt
+++ b/.github/actions/incremental-build/manual-it-mapping.txt
@@ -5,8 +5,6 @@
#
# Format: source-artifact-id : it-module-path : command
#
-# Salesforce Maven Plugin integration tests
-camel-salesforce-maven-plugin:components/camel-salesforce/camel-salesforce-maven-plugin:mvn
verify -f components/camel-salesforce/camel-salesforce-maven-plugin
-Pplugin-itest
# JBang integration tests
camel-jbang-core:dsl/camel-jbang/camel-jbang-it:mvn verify -f
dsl/camel-jbang/camel-jbang-it -Djbang-it-test
camel-jbang-main:dsl/camel-jbang/camel-jbang-it:mvn verify -f
dsl/camel-jbang/camel-jbang-it -Djbang-it-test