修复:移除 dependencyManagement 中 joda-time 的 test scope,防止覆盖下游项目依赖范围#4016
Merged
Conversation
Agent-Logs-Url: https://github.com/binarywang/WxJava/sessions/d46a3d65-8ba9-43d6-b8fa-a875de0ae987 Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix joda-time dependency being overridden in springboot4
修复:移除 dependencyManagement 中 joda-time 的 test scope,防止覆盖下游项目依赖范围
May 23, 2026
There was a problem hiding this comment.
Pull request overview
该 PR 修复了根 pom.xml 的 dependencyManagement 中对 joda-time 误设为 scope=test 的问题,避免 WxJava 作为 BOM 被下游项目导入时覆盖其 joda-time 依赖范围,从而导致运行时不可用。
Changes:
- 在根
pom.xml的dependencyManagement中移除joda-time的<scope>test</scope>,仅保留版本管理。 - 调整“测试所用依赖”注释块的位置,使其继续覆盖后续测试依赖(如 logback、testng 等)。
Agent-Logs-Url: https://github.com/binarywang/WxJava/sessions/e8790097-f42d-4742-930f-3dc3b3f99d23 Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.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.
在根
pom.xml的dependencyManagement中,joda-time被标记为scope=test。当下游项目(如 Spring Boot 4 / Spring Cloud 2025.1 微服务)通过 BOM 方式引入 WxJava 时,该 scope 会覆盖下游项目自身对joda-time的依赖声明,导致其在运行时不可用。变更
pom.xml:将joda-time从"测试所用依赖"注释块中移出,去除<scope>test</scope>,仅保留版本管理。各子模块(
weixin-java-mp、weixin-java-miniapp、weixin-java-open、weixin-java-qidian)在自身<dependencies>中已显式声明scope=test,行为不受影响。dependencyManagement应仅管理版本,不应约束 scope。