-
Notifications
You must be signed in to change notification settings - Fork 44
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
Download Gradle Plugins from Nexus #785
Comments
If nexus gets provisioned from scratch by the current configuration, initial downloads will also fail. |
I tried a few things today and came up with a possible solution, before creating a draft PR I'd like to have feedback and start discussing possible other options/improvements. My idea would be to basically move the nexus vars handling that we currently have in My change would include:
|
I assume the gradle plugin portal URL got whitelisted by now in our internal network and hence this issue here might not be a bug per se anymore. But, as described above, if we want to use nexus for pulling gradle plugins as well instead of getting them from the public plugin portal, we still need to consider something like my proposal above. |
EDIT: This issue was named "Can't locally pull gradle plugins from inside corporate network" beforehand but the plugin URL seems to be whitelisted by now and hence it is not a blocking bug anymore but rather a improvement request.
Describe the bug
It is not possible anymore for us to build locally via gradle because the gradle repository is being blocked by our corporate network (or a service that is being used for security on top). A service application was recently installed on our laptops that adds further security on top of the VPN connection and it might be happening since then, but that is just a guess.
To be more precise, if I use gradle and have a plugin version in my build.gradle that is NOT already locally (cached) on my machine, I get with this part in my build.gradle
the following error:
This issue was raised by a colleague who also found a way to deal with it by not using the public gradle plugin portal but rather going via the corporates nexus. For this to work the repositories have to be added to settings.gradle as described here:
https://docs.gradle.org/current/userguide/plugins.html#sec:custom_plugin_repositories
For this to understand it is important to know that the gradle plugin repositories are different (they are used just for the plugins) than the repositories that are being used by gradle for pulling the application's dependencies and that we already configure in our quickstarter to use nexus (see https://github.com/opendevstack/ods-quickstarters/blob/master/be-java-springboot/templates/gradle-repositories.template)
A solution (next to asking the IT to unblock the public repo) could be to add the nexus plugin repos to settings.gradle if nexus vars are set (analogous to like we do it here) while provisioning.
To Reproduce
Steps to reproduce the behavior:
./gradlew
The text was updated successfully, but these errors were encountered: