Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeclaredMode: 准确提取 jar 的 identity #615

Open
lvjing2 opened this issue Mar 4, 2023 · 4 comments
Open

DeclaredMode: 准确提取 jar 的 identity #615

lvjing2 opened this issue Mar 4, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lvjing2
Copy link
Collaborator

lvjing2 commented Mar 4, 2023

Your question

如该 milestone 所描述,declaredMode 还存在如下的不完善地方,需要解决
https://github.com/sofastack/sofa-ark/milestone/21
image

这里解决其中第三个问题

从基座里查找出来的依赖,需要判断是否是模块里声明的逻辑在 isDeclared() 内,需要准确提取出 jar 里的 groupdId + artifactId, 但当前只提取了 artifactId, 如果基座和模块里有 groupId 不同 artifactId 相同的依赖,会被误认为也是允许委托加载的。

Actions

  1. 提取 artifaceId, 部分从 jar 名字和 pom.properties 都提取不出 artifactId 的能否有方式提取出。
  2. 提取出 jar 的 groupId
  3. 根据 groupId + artifactId 来判断该依赖在模块中是否声明,是否可以从基座中委托加载。
@lylingzhen lylingzhen added the enhancement New feature or request label Mar 17, 2023
@lvjing2 lvjing2 added the good first issue Good for newcomers label Mar 31, 2023
@lvjing2 lvjing2 assigned sususama and unassigned lvjing2 Apr 11, 2023
@sususama sususama pinned this issue Apr 25, 2023
@sususama sususama unpinned this issue Apr 25, 2023
@lylingzhen
Copy link
Contributor

@sususama 这个 Issue 也是你正在看吗?

@sususama
Copy link
Collaborator

@sususama 这个 Issue 也是你正在看吗?

我在看,但是还没有解决思路

@lvjing2 lvjing2 added the help wanted Extra attention is needed label Aug 16, 2023
@WindSearcher
Copy link

我试试看看哈

@sususama sususama assigned WindSearcher and unassigned sususama Aug 16, 2023
@sususama
Copy link
Collaborator

sususama commented Sep 7, 2023

模仿ark里面提取artifactID的方法来同样提取groupID,但是sofaark的打包模式下只将artifactId进行打包,需要将GroupID也放入打好的Jar包中就可以提取出来,我卡在了改变sofaArk的打包方式。
com.alipay.sofa.ark.boot.mojo.RepackageMojo#getAllArtifact
改变打包的代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants