Closed Covenanter closed 2 months ago
我的微服务需要瘦身合并部署至基座,每个微服务基本上的依赖是差不多的,但会存在少许的差距,比如某个服务会依赖特定的jar,这些包可能没有必要下沉到基座。 如使用rules.txt、rules.properties、rules.yml瘦身,则每个微服务需要引入相应的配置,且配置的内容可能会存在重复的情况,且在做瘦身的工作时需要不断的排查依赖树。
我希望只需要在maven插件中显示声明该服务仅保留某些jar,其他的jar全部排除。 这样可以大幅度减少服务瘦身的工作量,当ark-biz装载到基座,运行时出现class not found时,我可以很好的判断这些类库是放置在ark-biz中还是下沉到基座了。
如果能像excludeGroupIds、excludeArtifactIds这样提供includeGroupIds、includeArtifactIds的能力。
初步想法 1、maven配置<excludeGroupIds>*</excludeGroupIds> 2、引入新标签<includeGroupIds>com.xxxx*</includeGroupIds>
<excludeGroupIds>*</excludeGroupIds>
<includeGroupIds>com.xxxx*</includeGroupIds>
good idea, 我们最近正在重新设计新版的模块瘦身方案,这部分设计值得考虑进去 @gaosaroma
1
fixed by https://github.com/sofastack/sofa-ark/pull/978
不过目前还是缺少全局排除的黑名单配置方式 '*'
Feature description
我的微服务需要瘦身合并部署至基座,每个微服务基本上的依赖是差不多的,但会存在少许的差距,比如某个服务会依赖特定的jar,这些包可能没有必要下沉到基座。 如使用rules.txt、rules.properties、rules.yml瘦身,则每个微服务需要引入相应的配置,且配置的内容可能会存在重复的情况,且在做瘦身的工作时需要不断的排查依赖树。
我希望只需要在maven插件中显示声明该服务仅保留某些jar,其他的jar全部排除。 这样可以大幅度减少服务瘦身的工作量,当ark-biz装载到基座,运行时出现class not found时,我可以很好的判断这些类库是放置在ark-biz中还是下沉到基座了。
如果能像excludeGroupIds、excludeArtifactIds这样提供includeGroupIds、includeArtifactIds的能力。
初步想法 1、maven配置
<excludeGroupIds>*</excludeGroupIds>
2、引入新标签<includeGroupIds>com.xxxx*</includeGroupIds>