Aias00 opened a new issue, #7608:
URL: https://github.com/apache/shenyu/issues/7608

   ## Summary
   The root `pom.xml` force-inherits `com.google.guava:guava` (compile scope) 
into **every** reactor module via the top-level `<dependencies>` block, even 
modules that never use it.
   
   ## Evidence
   - `pom.xml:610` opens the root `<dependencies>` block.
   - `pom.xml:612-620` declares `com.google.guava:guava` (with 
`com.google.re2j:re2j` exclusion) inside that global block, alongside 
`slf4j-api` / `jcl-over-slf4j` / `junit-jupiter` / `junit-vintage`.
   - Guava is the only non-logging / non-test **compile** dependency globally 
inherited here; it is not universally required.
   
   Side effect: global inheritance bloats every module's classpath with Guava's 
(large) transitive tree and masks `dependency:analyze` "unused declared" 
warnings for modules that don't actually need it.
   
   ## Action
   1. Remove the guava `<dependency>` from root `<dependencies>` 
(`pom.xml:611-620`).
   2. Keep guava centralized in root `<dependencyManagement>` 
(`pom.xml:329-333`) so the version stays managed.
   3. Add an explicit `<dependency>com.google.guava:guava</dependency>` 
(version managed) **only** to the modules that actually import 
`com.google.common.*` (typically `shenyu-admin`, `shenyu-common` — verify with 
`git grep com.google.common`).
   4. Per affected module, run `mvn dependency:analyze` to confirm no "Used 
undeclared" regressions after the change.
   
   ## Acceptance
   - No module inherits guava unintentionally.
   - Explicit guava dependencies exist only where used.
   - CI green.
   
   ## Related
   - #7583 (dependency cleanup umbrella)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to