This is an automated email from the ASF dual-hosted git repository.

pcongiusti 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 b5e4a43c2abe fix(ci): use artifactId instead of module dirname
b5e4a43c2abe is described below

commit b5e4a43c2abe08d6db951b4bda75580f5737fb99
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Tue Nov 4 11:04:28 2025 +0100

    fix(ci): use artifactId instead of module dirname
---
 .github/actions/detect-dependencies/detect-test.sh | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/.github/actions/detect-dependencies/detect-test.sh 
b/.github/actions/detect-dependencies/detect-test.sh
index e6ad2144de36..16025b5ded91 100755
--- a/.github/actions/detect-dependencies/detect-test.sh
+++ b/.github/actions/detect-dependencies/detect-test.sh
@@ -30,19 +30,20 @@ detect_changed_properties() {
 
 find_affected_modules() {
   local property_name="$1"
-
+  local mavenBinary=${2}
   local affected=()
+
   while IFS= read -r pom; do
     if grep -q "\${${property_name}}" "$pom"; then
-      affected+=("$(dirname "$pom")")
+      affected+=("$pom")
     fi
   done < <(find . -name "pom.xml")
 
   affected_transformed=""
 
-  for dir in "${affected[@]}"; do
-      base=$(basename "$dir")
-      affected_transformed+=":$base,"
+  for pom in "${affected[@]}"; do
+      artifactId=$($mavenBinary -f "$pom" help:evaluate 
-Dexpression=project.artifactId -q -DforceStdout)
+      affected_transformed+=":$artifactId,"
   done
 
   echo "$affected_transformed"
@@ -66,7 +67,7 @@ main() {
   modules_affected=""
 
   while read -r prop; do
-    modules=$(find_affected_modules "$prop")
+    modules=$(find_affected_modules "$prop" $mavenBinary)
     modules_affected+="$modules"
   done <<< "$changed_props"
 

Reply via email to