You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I investigated this on commit 297ac6f849857bd0c2ad368709013e98494b0330 (2.7.2-SNAPSHOT). Enabling the suggested rules exposes existing dependency conflicts, so this needs a dependency-alignment plan as well as the plugin declaration.
One clarification to the description: the effective POM already inherits an Enforcer execution named enforce-maven-version from org.apache:apache:21, requiring Maven 3.0.5. A repository-only grep misses that inherited execution. The proposed repository-owned Maven 3.6.3+/Java 17+ policy and dependency checks are still needed.
For the experiment, I added maven-enforcer-plugin:3.6.3 to the root build/plugins, bound enforce to validate, with:
No dependency versions or dependency exclusions were changed for this experiment. The wrapper uses Maven 3.6.3; validation ran on JDK 21.0.10. Java 17+ also preserves the existing Java 21 compatibility CI job.
Results with that configuration:
./mvnw -B -ntp -N validate passes all four rules and Checkstyle. This checks only the root project, so it is insufficient to establish reactor readiness.
./mvnw -B -ntp -pl shenyu-common -am validate fails in shenyu-common with actual dependency-rule violations.
To inventory the whole reactor without stopping at the first violation, I ran ./mvnw -B -ntp validate -Denforcer.fail=false -Dcheckstyle.skip=true. In this local audit, 191 of 213 reactor projects reported dependency-rule violations: 15 distinct artifact coordinates for convergence and 36 for upper bounds, with 39 distinct coordinates across both rules. These counts include repeated transitive problems inherited by downstream projects; they are not 191 independent root causes. The audit's exit success is due to the diagnostic enforcer.fail=false override, not a clean dependency graph.
The minimal shenyu-common reproduction already shows:
Artifact
Observed conflict
org.checkerframework:checker-qual
Caffeine 2.9.3 requests 3.19.0; Guava 32.0.0-jre requests 3.33.0. Both convergence and upper-bound checks fail.
Dependency management resolves 2.0.13, while OSHI 6.10.0 requests 2.0.17. The upper-bound check fails.
The full reactor additionally reports framework/BOM alignment problems, for example:
Spring Context resolves 6.1.10 while a transitive path requests 6.2.19.
Reactor Core resolves 3.6.7 while a transitive path requests 3.7.19.
MCP resolves 0.17.0 while Spring AI 1.1.8 requests MCP 0.18.3.
Other violations involve Jackson, Micrometer, ASM, Guava, OkHttp, Commons IO, Spring LDAP, and Elasticsearch.
Unconditionally enabling both strict dependency rules therefore makes existing module builds fail immediately, even though root-only validation passes. Before proceeding with a PR, could maintainers confirm whether dependency alignment should be included in this issue, or handled through prerequisite fixes/staged rollout? Keeping dependency checks warning-only permanently would leave the drift guardrail incomplete.
Thanks @yangjj-iso — this is an excellent audit, and it changes how we should land this.
Decision: staged rollout, not one bundled change.
1. #6602 stays scoped to the plugin + version guardrails (hard-fail, safe).
Confirmed your setup: the root POM inherits org.apache:apache:21, which already brings an enforce-maven-version execution pinned to Maven 3.0.5 (so a repo-only grep misses it — good catch), and <java.version> is 17. So #6602 will add a repo-owned maven-enforcer-plugin execution bound to validate with only the rules that already pass:
requireMavenVersion — <version>[3.6.3,)</version> (upgrades the inherited 3.0.5 floor to match the wrapper)
That delivers the build-time guardrail the issue is about, without breaking any module.
2. Dependency alignment is tracked separately, not bundled into #6602.
191/213 projects with violations is a cross-cutting change; folding it in would make the PR unreviewable and delay the safe win. I've opened #7679 to own it, seeded with your inventory.
3. Staged enablement of the dependency rules (in #7679):
Stage 1 (transitional): land dependencyConvergence + requireUpperBoundDeps in report-only mode so drift is visible in CI without blocking builds.
Stage 2: align the graph via <dependencyManagement>/BOM, module by module.
Stage 3: flip both rules to hard-fail (globally, or per-module as each is cleaned).
4. Warning-only is transitional, not the end state. Agreed — permanently leaving the dependency checks non-failing would leave the guardrail incomplete; the target is hard-fail once the graph is aligned.
If you're happy with this split, would you like to open step 1 (plugin + version rules only, no dependency rules) as a PR against master? Please paste your shenyu-common minimal repro into #7679 as the starting point. Thanks again for the thorough investigation.
@yangjj-iso — following up on the plan above so we keep momentum: the step-1 PR for this issue is unblocked whenever you're ready.
Scope (small, self-contained, passes as-is):
add a repo-owned maven-enforcer-plugin execution bound to the validate phase in the root pom.xml
rules: requireMavenVersion[3.6.3,) and requireJavaVersion[${java.version},) (17+)
no dependency rules, no<dependencyManagement> changes
That keeps the diff reviewable and leaves the dependency-convergence work entirely to #7679.
If you'd like to take it, just open the PR against master and reference this issue ([ISSUE #6602] ...). If you'd rather not pick it up, say so and I'll draft it myself so we don't block on it.
Either way, please drop your shenyu-common minimal repro into #7679 so it can serve as the starting point for the alignment work. Thanks again for the thorough audit.
Activity
github-actions commentedon Aug 2, 2026
👋 Hello @yuluo-yx
A new issue has been opened by @Aias00:
Please review when you have time. Thank you! 🙏
yangjj-iso commentedon Oct 16, 2026
I investigated this on commit
297ac6f849857bd0c2ad368709013e98494b0330(2.7.2-SNAPSHOT). Enabling the suggested rules exposes existing dependency conflicts, so this needs a dependency-alignment plan as well as the plugin declaration.One clarification to the description: the effective POM already inherits an Enforcer execution named
enforce-maven-versionfromorg.apache:apache:21, requiring Maven 3.0.5. A repository-only grep misses that inherited execution. The proposed repository-owned Maven 3.6.3+/Java 17+ policy and dependency checks are still needed.For the experiment, I added
maven-enforcer-plugin:3.6.3to the rootbuild/plugins, boundenforcetovalidate, with:No dependency versions or dependency exclusions were changed for this experiment. The wrapper uses Maven 3.6.3; validation ran on JDK 21.0.10. Java 17+ also preserves the existing Java 21 compatibility CI job.
Results with that configuration:
./mvnw -B -ntp -N validatepasses all four rules and Checkstyle. This checks only the root project, so it is insufficient to establish reactor readiness../mvnw -B -ntp -pl shenyu-common -am validatefails inshenyu-commonwith actual dependency-rule violations../mvnw -B -ntp validate -Denforcer.fail=false -Dcheckstyle.skip=true. In this local audit, 191 of 213 reactor projects reported dependency-rule violations: 15 distinct artifact coordinates for convergence and 36 for upper bounds, with 39 distinct coordinates across both rules. These counts include repeated transitive problems inherited by downstream projects; they are not 191 independent root causes. The audit's exit success is due to the diagnosticenforcer.fail=falseoverride, not a clean dependency graph.The minimal
shenyu-commonreproduction already shows:org.checkerframework:checker-qualcom.google.errorprone:error_prone_annotationsorg.slf4j:slf4j-apiThe full reactor additionally reports framework/BOM alignment problems, for example:
Unconditionally enabling both strict dependency rules therefore makes existing module builds fail immediately, even though root-only validation passes. Before proceeding with a PR, could maintainers confirm whether dependency alignment should be included in this issue, or handled through prerequisite fixes/staged rollout? Keeping dependency checks warning-only permanently would leave the drift guardrail incomplete.
Aias00 commentedon Oct 16, 2026
Thanks @yangjj-iso — this is an excellent audit, and it changes how we should land this.
Decision: staged rollout, not one bundled change.
1. #6602 stays scoped to the plugin + version guardrails (hard-fail, safe).
Confirmed your setup: the root POM inherits
org.apache:apache:21, which already brings anenforce-maven-versionexecution pinned to Maven 3.0.5 (so a repo-only grep misses it — good catch), and<java.version>is17. So #6602 will add a repo-ownedmaven-enforcer-pluginexecution bound tovalidatewith only the rules that already pass:requireMavenVersion—<version>[3.6.3,)</version>(upgrades the inherited 3.0.5 floor to match the wrapper)requireJavaVersion—<version>[${java.version},)</version>(17+)That delivers the build-time guardrail the issue is about, without breaking any module.
2. Dependency alignment is tracked separately, not bundled into #6602.
191/213 projects with violations is a cross-cutting change; folding it in would make the PR unreviewable and delay the safe win. I've opened #7679 to own it, seeded with your inventory.
3. Staged enablement of the dependency rules (in #7679):
dependencyConvergence+requireUpperBoundDepsin report-only mode so drift is visible in CI without blocking builds.<dependencyManagement>/BOM, module by module.4. Warning-only is transitional, not the end state. Agreed — permanently leaving the dependency checks non-failing would leave the guardrail incomplete; the target is hard-fail once the graph is aligned.
If you're happy with this split, would you like to open step 1 (plugin + version rules only, no dependency rules) as a PR against
master? Please paste yourshenyu-commonminimal repro into #7679 as the starting point. Thanks again for the thorough investigation.Aias00 commentedon Oct 16, 2026
@yangjj-iso — following up on the plan above so we keep momentum: the step-1 PR for this issue is unblocked whenever you're ready.
Scope (small, self-contained, passes as-is):
maven-enforcer-pluginexecution bound to thevalidatephase in the rootpom.xmlrequireMavenVersion[3.6.3,)andrequireJavaVersion[${java.version},)(17+)<dependencyManagement>changesThat keeps the diff reviewable and leaves the dependency-convergence work entirely to #7679.
If you'd like to take it, just open the PR against
masterand reference this issue ([ISSUE #6602] ...). If you'd rather not pick it up, say so and I'll draft it myself so we don't block on it.Either way, please drop your
shenyu-commonminimal repro into #7679 so it can serve as the starting point for the alignment work. Thanks again for the thorough audit.[ISSUE #6602] Enforce Maven and Java build requirements (#7680)