-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Make localhost repositories accessible with --offline #12988
Comments
@ljacomet Could you provide some guidance on this issue? I would really need this issue to be fixed and was going to work on a PR in the coming week. The first question, is this something Gradle would allow? I believe there is some good reason for allowing it as localhost has already special treatment with regards to HTTP vs HTTPS. It seems a patch to |
Last we discussed this issue, we did not find it very compelling to have exceptions to Another focus that looks much more promising and should - we believe - answer similar use cases, potentially better, would be to have a proper caching mechanism for file based repositories. See #8589 and #8360. |
Could we look at white-listing the local IP address instead (that is 127.0.0.1)? It's a well-known value that always points to the current machine/container. The reason for asking such request is around having a public API for custom repositories. At the moment, it is not possible to feed custom metadata to the dependency engine to resolve artifacts outside of maven style repositories. It seems to be a long way off before Gradle offers such public API. However, with the current API, it is possible to use a proxy maven server for this purpose. The issue comes when the computer is offline using I could mount a virtual file system and inject my custom metadata via the file system which would result in the same end result: Gradle quering a local server for dependency metadata. However, given the added complexity of such solution, I would rather not implement that. How can we solve such use case? |
Looking for a solution to #12748, an idea was suggested to me to start up a web server that would handle the artifact downloading and caching to work for my use case. Its a good idea, however we use the --offline flag, which blocks any http repositories, including localhost repositories. These should be allowed through --offline, since they are local.
Expected Behavior
A localhost hosted repository with --offline should be resolvable, similar to filesystem repositories.
Current Behavior
The localhost repository isn't searched at all, and cached artifacts are not found.
The text was updated successfully, but these errors were encountered: