Closed AiWu4Damon closed 1 year ago
以java -jar启动 当解析的jar包是 jar中jar中jar时报错 方法:com.alipay.sofa.ark.loader.jar.JarUtils#parseArtifactId
入参:/Users/xx/IdeaProjects/app/app-starter/target/app-starter-1.0.0-SNAPSHOT.jar!/BOOT-INF/lib/app2-starter-1.0.0-ark-biz.jar!/lib/app3-client-220630-cube.jar!/
希望可以正确解析出ArtifactId = app3-client
报错File must exist
以java-jar启动项目 方法:com.alipay.sofa.ark.loader.jar.JarUtils#parseArtifactId 入参:/Users/xx/IdeaProjects/app/app-starter/target/app-starter-1.0.0-SNAPSHOT.jar!/BOOT-INF/lib/app2-starter-1.0.0-ark-biz.jar!/lib/app3-client-220630-cube.jar!/ 会委托给com.alipay.sofa.ark.loader.jar.JarUtils#parseArtifactIdFromJarInJar方法加载,rootPath=/Users/xx/IdeaProjects/app/app-starter/target/app-starter-1.0.0-SNAPSHOT.jar!/BOOT-INF/lib/app2-starter-1.0.0-ark-biz.jar 但是rootPath的路径其实是个jar中jar,com.alipay.sofa.ark.loader.data.RandomAccessDataFile#RandomAccessDataFile(java.io.File, int)中报错File must exist
java -version
uname -a
@AiWu4Damon @lvjing2 这个 Bug 是正在修复是吗?还在调整 MR 的单测?
https://github.com/sofastack/sofa-ark/pull/664 调整了解法
PR was merged. Close this issue.
Describe the bug
以java -jar启动 当解析的jar包是 jar中jar中jar时报错 方法:com.alipay.sofa.ark.loader.jar.JarUtils#parseArtifactId
入参:/Users/xx/IdeaProjects/app/app-starter/target/app-starter-1.0.0-SNAPSHOT.jar!/BOOT-INF/lib/app2-starter-1.0.0-ark-biz.jar!/lib/app3-client-220630-cube.jar!/
Expected behavior
希望可以正确解析出ArtifactId = app3-client
Actual behavior
报错File must exist
Steps to reproduce
以java-jar启动项目 方法:com.alipay.sofa.ark.loader.jar.JarUtils#parseArtifactId 入参:/Users/xx/IdeaProjects/app/app-starter/target/app-starter-1.0.0-SNAPSHOT.jar!/BOOT-INF/lib/app2-starter-1.0.0-ark-biz.jar!/lib/app3-client-220630-cube.jar!/ 会委托给com.alipay.sofa.ark.loader.jar.JarUtils#parseArtifactIdFromJarInJar方法加载,rootPath=/Users/xx/IdeaProjects/app/app-starter/target/app-starter-1.0.0-SNAPSHOT.jar!/BOOT-INF/lib/app2-starter-1.0.0-ark-biz.jar 但是rootPath的路径其实是个jar中jar,com.alipay.sofa.ark.loader.data.RandomAccessDataFile#RandomAccessDataFile(java.io.File, int)中报错File must exist
Minimal yet complete reproducer code (or GitHub URL to code)
Environment
java -version
): 11uname -a
): Mac OS