Skip to content

sofa ark 在多 module 的 maven 仓库打包 declared-libraries 不正确 #1057

@cwbhhjl

Description

@cwbhhjl

用官方示例仓库就可以复现 https://github.com/sofastack-guides/sofa-ark-dynamic-guides

首先确保本地 maven 仓库里没有缓存,具体到这个例子是 rm -rf ~/.m2/repository/io/sofastack/dynamic-facade

然后在上述项目的根目录执行 mvn package

完成后进入项目里的 dynamic-provider/target 目录,解压 sofaark jar,会发现它的 manifest 文件 declared-libraries 里包含了基座 (即 dynamic-stock-mng) 的一部分依赖,比如 fastjson

Manifest-Version: 1.0
Created-By: Maven Jar Plugin 3.2.0
Build-Jdk-Spec: 22
Implementation-Title: dynamic-provider
Implementation-Version: 1.0.0
Main-Class: io.sofastack.dynamic.provider.ProviderApplication
Ark-Biz-Name: dynamic-provider
Ark-Biz-Version: 1.0.0
priority: 100
web-context-path: provider
deny-import-packages: 
deny-import-classes: 
deny-import-resources: 
inject-plugin-dependencies: 
inject-export-packages: 
declared-libraries: sofa-ark-archive,web-ark-plugin,spring-boot-starter,
 jackson-module-parameter-names,spring-jcl,snakeyaml,sofa-boot,logback-c
 lassic,tomcat-embed-core,sofa-boot-actuator-autoconfigure,spring-core,h
 essian,HdrHistogram,spring-web,slf4j-api,spring-expression,jakarta.anno
 tation-api,logback-core,sofa-ark-springboot-starter,sofa-ark-all,guice-
 multibindings,log4j-api,sofa-ark-common,thymeleaf,jackson-datatype-jsr3
 10,sofa-ark-compatible-springboot2,javax.inject,spring-context,sofa-ark
 -api,log-sofa-boot,dynamic-facade,healthcheck-sofa-boot-starter,unbesca
 pe,jackson-annotations,runtime-sofa-boot-starter,log4j-to-slf4j,thymele
 af-extras-java8time,spring-boot-actuator,spring-boot-starter-logging,ja
 karta.el,spring-boot-starter-tomcat,sofa-common-tools,netty-all,sofa-ar
 k-common-springboot,sofa-boot-autoconfigure,spring-boot,jackson-core,ao
 palliance,micrometer-core,sofa-ark-support-starter,healthcheck-sofa-boo
 t,spring-boot-starter-web,log-sofa-boot-starter,fastjson,runtime-sofa-b
 oot,sofa-ark-exception,jackson-datatype-jdk8,sofa-ark-spi,jackson-datab
 ind,spring-boot-autoconfigure,sofa-ark-container,jul-to-slf4j,spring-we
 bmvc,runtime-sofa-boot-plugin,spring-boot-actuator-autoconfigure,spring
 -aop,attoparser,spring-beans,tomcat-embed-websocket,thymeleaf-spring5,s
 pring-boot-starter-json,spring-boot-loader,spring-boot-starter-thymelea
 f,sofa-boot-actuator,commons-io,guice,spring-boot-starter-actuator,Late
 ncyUtils
build-time: 2025-01-13T21:04:36+0800
remote-origin-url: https://github.com/sofastack-guides/sofa-ark-dynamic-
 guides.git
commit-branch: master
commit-id: 1048340847da9b66c05fc2be0456f96fd4ced67f
commit-user-name: leo james
commit-user-email: [email protected]
commit-time: 2024-02-20T10:28:47+0800
commit-timestamp: 1708396127000
build-user: cwbhhjl
build-email: [email protected]


其他信息

$ mvn -v

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /opt/homebrew/Cellar/maven/3.9.9/libexec
Java version: 22.0.2, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/22.0.2/libexec/openjdk.jdk/Contents/Home
Default locale: zh_CN_#Hans, platform encoding: UTF-8
OS name: "mac os x", version: "14.5", arch: "aarch64", family: "mac"

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions