-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support multiple nesting of JAR files #293
Conversation
One thing I am unsure of is whether it is correct to treat URLs of form |
d13bd26
to
fc407ab
Compare
TestApp still fails 😭 I have put your classes inside the app and removed jar with original classes from dependencies.
|
Do you know what URL was input into the method? |
BTW if you simply replace lastIndexOf with indexOf - everything works (spring magic 🤷♀️) |
Well, at least I was correct about it being a two-level nesting. I have an idea for a fix, but I'm going to add some additional unit tests first. |
With IntelliJ IDEA you can debug jar file: you build spring jar with gradle bootJar, then you add Run/Debug configuration - JAR Application with path to your jar (e.g. D:/TEMP/SmallRyeConfig-SpringBoot/build/libs/SmallRyeConfig-SpringBoot-1.0.jar) |
https://github.com/magicprinc/SmallRyeConfig-SpringBoot/tree/fixBundled url: file: jar: localPath:
url: can be read LOG |
Can you determine whether the sub-entry |
OK, this version should be able to detect whether a nested entry is a JAR or a directory and act accordingly. |
* Make sure that `jar:file:///...` are properly formed (the sub-URL must have a scheme of `file`) * When there is no `!` in the JAR URL, treat the file as a JAR and process its root path * Otherwise recursively resolve each segment which is `!`-terminated
One more fix to prevent wrong path lookups if the |
Works! jarPath: The code is quite complicated, so I hope you would have enough unit tests 😅 |
BTW, sorry for a noob question... |
That's a more complex question than it seems to be ;) There are several answers though:
|
When is it possible to have snapshot/RC version in maven repo? 😥🙏 PS: IDEA recommends flipping couple of .equals |
I'm just doing some final testing with Quarkus to make sure nothing has broken. |
Looks good. |
jar:file:///...
are properly formed (the sub-URL must have a scheme offile
)!
in the JAR URL, treat the file as a JAR and process its root path!
-terminatedFixes #289