You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ap...@apache.org on 2026/10/16 12:30:41 UTC
(camel) branch fixGitHubActionsScriptToNotIncludeModulesInsideSrcMainResourcesOrSrcIT created (now fba6224c659f)
This is an automated email from the ASF dual-hosted git repository.
apupier pushed a change to branch fixGitHubActionsScriptToNotIncludeModulesInsideSrcMainResourcesOrSrcIT
in repository https://gitbox.apache.org/repos/asf/camel.git
at fba6224c659f CAMEL-24812: ci - do not include modules located under src/ in the incremental build
This branch includes the following new commits:
new fba6224c659f CAMEL-24812: ci - do not include modules located under src/ in the incremental build
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel) 01/01: CAMEL-24812: ci - do not include modules located under src/ in the incremental build
Posted by ap...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch fixGitHubActionsScriptToNotIncludeModulesInsideSrcMainResourcesOrSrcIT
in repository https://gitbox.apache.org/repos/asf/camel.git
commit fba6224c659f8cb5fbb5504d1f8f21a1d0d44748
Author: Aurélien Pupier <ap...@ibm.com>
AuthorDate: Fri Oct 16 14:29:49 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.
Co-authored-by: IBM Bob 2.2.1
Signed-off-by: Aurélien Pupier <ap...@ibm.com>
---
.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