chore(ci): Fix parent POM dependency change detection#22022
Merged
Conversation
The detect-dependencies action was not finding affected modules because
it searched for ${property-name} references in module pom.xml files.
This never matches because modules inherit managed versions from the
parent without referencing the property directly.
New approach:
1. Detect changed properties in parent/pom.xml diff
2. Map each property to the artifact(s) it versions in dependencyManagement
3. Find modules that depend on those artifacts by searching for artifactId
4. Run tests for affected modules
Also adds:
- PR comment posting with test results summary
- Step summary output
- Proper skip-mvnd-install input in action.yaml
- Run only on non-experimental matrix (skip JDK 25)
- Remove overly restrictive version|dependency|artifact filter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Instead of grepping pom.xml files for artifactId references (which misses transitive dependencies), use toolbox:tree-find to scan the full dependency tree of every module in the reactor. This accurately detects modules affected by BOM version bumps (e.g., netty-bom -> all modules using any io.netty artifact transitively). Key changes: - Extract groupId:artifactId from parent pom (not just artifactId) - Detect BOM imports and search by groupId wildcard - Use awk to parse toolbox output (mvnd strips module prefixes when captured to variables) - Add coverage to exclusion list Tested locally: jaxb-impl-version correctly finds camel-parquet-avro (transitive via hadoop-common -> jersey-json -> jaxb-impl). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vignesh-manel
pushed a commit
to vignesh-manel/camel
that referenced
this pull request
Mar 18, 2026
* chore(ci): Fix parent POM dependency change detection
The detect-dependencies action was not finding affected modules because
it searched for ${property-name} references in module pom.xml files.
This never matches because modules inherit managed versions from the
parent without referencing the property directly.
New approach:
1. Detect changed properties in parent/pom.xml diff
2. Map each property to the artifact(s) it versions in dependencyManagement
3. Find modules that depend on those artifacts by searching for artifactId
4. Run tests for affected modules
Also adds:
- PR comment posting with test results summary
- Step summary output
- Proper skip-mvnd-install input in action.yaml
- Run only on non-experimental matrix (skip JDK 25)
- Remove overly restrictive version|dependency|artifact filter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(ci): Use Maveniverse Toolbox for accurate dependency detection
Instead of grepping pom.xml files for artifactId references (which
misses transitive dependencies), use toolbox:tree-find to scan the
full dependency tree of every module in the reactor.
This accurately detects modules affected by BOM version bumps (e.g.,
netty-bom -> all modules using any io.netty artifact transitively).
Key changes:
- Extract groupId:artifactId from parent pom (not just artifactId)
- Detect BOM imports and search by groupId wildcard
- Use awk to parse toolbox output (mvnd strips module prefixes
when captured to variables)
- Add coverage to exclusion list
Tested locally: jaxb-impl-version correctly finds camel-parquet-avro
(transitive via hadoop-common -> jersey-json -> jaxb-impl).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
detect-dependenciesCI action was never finding affected modules for dependabot PRs that bump versions inparent/pom.xml.Root cause: The script searched for
${property-name}(e.g.,${jaxb-impl-version}) in modulepom.xmlfiles. This never matches because modules inherit managed versions from the parent's<dependencyManagement>without referencing the property directly — they just declare<artifactId>jaxb-impl</artifactId>without a<version>.Fix: New approach that maps properties to artifacts to modules:
parent/pom.xmlto find changed property namesparent/pom.xmlto find which<artifactId>uses each property as its<version>in<dependencyManagement>pom.xmlfiles for those artifact IDsExample: For PR #22019 (
jaxb-impl-versionbump), the old script found 0 modules. The new script correctly findscamel-drill,camel-ibm-cos, andcamel-swift.Additional improvements
version|dependency|artifactkeyword filter on property namesskip-mvnd-installinput to avoid reinstalling mvndTest plan
jaxb-impl-version→jaxb-impl→camel-drill, camel-ibm-cos, camel-swiftdetection worksparent/pom.xmlwill exercise the full flow