ci: fix incremental build exclusion list failing on leaf modules#22657
Merged
Croway merged 1 commit intoApr 16, 2026
Merged
Conversation
Maven errors with "Could not find the selected project in the reactor" when -pl exclusions (e.g. !:camel-allcomponents) reference modules that are not dependents of the changed modules and therefore not in the -amd reactor. Fix by resolving the -amd reactor and dropping exclusions for modules not present in it. The threshold check's Maven call is reused to capture reactor artifact IDs, avoiding a second invocation.
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
davsclaus
approved these changes
Apr 16, 2026
6 tasks
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
Could not find the selected project in the reactor: :camel-allcomponentserror that breaks CI for PRs changing leaf modules (e.g. camel-jbang)-plwith-amdreferences modules that may not be dependents of the changed modules, causing Maven to fail when they're not in the resolved reactor-amdreactor and drop exclusions for modules not present in itRoot cause: introduced in #22247 (Apr 8) — the EXCLUSION_LIST was appended to
-pl -amdwithout validating that excluded modules are reachable as dependents. Works for core modules (whose dependents include everything) but fails for leaf modules with small reactors.Reproducer:
./mvnw -B -q help:evaluate -Dexpression=project.artifactId -pl "dsl/camel-jbang/camel-jbang-core,!:camel-allcomponents" -amdTest plan
camel-allcomponentsis correctly identified as NOT in the-amdreactor forcamel-jbang-corecamel-allcomponentsIS in the-amdreactor forcore/camel-api(exclusion kept)