-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix pathinfo with classifier and tar.bz2 type issue #103
Conversation
Seems a path contains classifier and the type of tar.bz2 will cause parse issue for pathinfo, we will treat it as special case like the tar.gz too. And also changes the java version to 11 and some code style issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
Hey @ligangty , sorry for jumping into this PR but this is somewhat interesting... |
@geored It's hard to use a dedicated pattern here because there is no limit to the classifier, like: Another case is: /org/jboss/modules/jboss-modules/1.5.0.Final-temporary-redhat-00033/jboss-modules-1.5.0.Final-temporary-redhat-00033-project-sources.tar.gz |
@ligangty so in the case of quarkus-google-cloud-services-bom-quarkus-platform-descriptor-2.13.7.Final-redhat-00001-2.13.7.Final-redhat-00001.json is the required for .json extension to be captured? |
@geored this is what we needed for this: And for case: jboss-modules-1.5.0.Final-temporary-redhat-00033-project-sources.tar.gz |
Yeah, it is for the one that i suggested as a example, but i you can capture only file extension then you can afterwards easily use already established code methods (in existing code) to get the artifactId, version and classifier. |
@geored Maybe I can give a more edged one here: wildfly-modules-8.7.0-redhat-00001-wildfly8.7.0.jar |
@ligangty hm.... i got it.... seems difficult to find proper regex for last edge case but i think if we use exclude pattern for numbers and dot's before .jar (or war) then i think we can capture those edge cases also, without compromising previous ones. |
@geored the pain point here for non-regex solution is the classifier part which don't have any limitation, especially it can have dots inside. This makes it hard to decide the type(file type suffix) here if it includes dots. Maybe this PR is not looking so smoothly, but that's what I can get besides a really complicated regex pattern. |
Seems a path contains classifier and the type of tar.bz2 will cause
parse issue for pathinfo, we will treat it as special case like the
tar.gz too.
And also changes the java version to 11 and some code style issue.