sofa-ark icon indicating copy to clipboard operation
sofa-ark copied to clipboard

feat: 模块瘦身检查 && 允许不自动排除和基座相同的依赖

Open gaosaroma opened this issue 4 months ago • 2 comments

在模块瘦身时,检查模块被插件排除的依赖是否: ● 基座运行时存在该依赖 ● 基座运行时的依赖是否和模块里的该依赖版本一致 使得:对于模块被插件排除的依赖,保证模块在编译期和运行期所用的依赖 GAV 一致。

具体技术细节: ● sofa-ark-maven-plugin 增加字段: ○ buildFailWhenExcludeDiffBaseDependency (检查被瘦身的包的版本是否和基座运行时版本一致) ■ false(默认) -> 如果不一致,就构建报错,但不会构建失败; ■ true -> 如果不一致,就构建报错,且构建失败; ○ excludeSameBaseDependency ■ true (默认) -> 自动排除和基座相同的依赖(GAV都相同) ■ false -> 不自动排除和基座相同的依赖

Summary by CodeRabbit

  • New Features

    • Enhanced artifact and dependency handling with new utility methods for better identification and filtering.
    • Added configuration options for excluding dependencies based on base identity and build failure conditions.
  • Bug Fixes

    • Improved error handling and logging for artifact exclusion checks.
  • Tests

    • Expanded test coverage with new cases for artifact exclusion and updated assertions to reflect new logic.

gaosaroma avatar Oct 21 '24 07:10 gaosaroma