Replies: 7 comments 9 replies
-
Yeah, I think we've seen the same problem and didn't find a solution either. |
Beta Was this translation helpful? Give feedback.
-
Should we introduce an additional feature to skip starting parts of the path from the original URL?
Here, https://repo1.maven.org/maven2/path-to-file would translate to https://maven-mirror.example.org/path-to-file. Whilst https://repo1.maven.org/maven3/path-to-file would translate to https://mirror.example.org/maven3/path-to-file because there is no more specific match available. |
Beta Was this translation helpful? Give feedback.
-
I'm not so happy with my first suggestion as this would reduce usability and make things more cryptic. Any thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
An implementation of the "skip-path" feature has been proposed for the libpak library in paketo-buildpacks/libpak#366. If this is found reasonable, a similar enhancement should be added in https://github.com/paketo-buildpacks/packit. |
Beta Was this translation helpful? Give feedback.
-
@bitgully thank you so much for enhancing the dependency mapping. Sorry for responding late had some other priorities last few month. This mapping work great for maven download if you have a mirror and only thing you have to skip is the path but I don't think it will work for us for gradle download as the mirror for that is setup differently. For example public download path for gradle is https://downloads.gradle.org/distributions/** But internally our mirror is setup like this https://mirror.internal.com/subpath/gradle-distributions-cache/** Thoughts on this pattern |
Beta Was this translation helpful? Give feedback.
-
Thanks @dmikusa for your review and merge into libpak. I've now ported the implementation to packit (currently awaiting review). |
Beta Was this translation helpful? Give feedback.
-
Following the guidance on setting up a mirror for Packeto from here, the mapping only allows you to replace the "HOST_URL" part of the path. With the maven repository, the URL pattern is typically https://repo1.maven.org/maven2/path-to-file. With this, the mirrors will typically replace the entire https://repo1.maven.org/maven2/ portion of the URL. There doesn't seem to be a way to do this replacement and having our mirrored repository contain the maven2 would be a bit of pain on our side.
I'm curious if anyone else has ran into this issue and what you have done to get around it.
Beta Was this translation helpful? Give feedback.
All reactions