-
Notifications
You must be signed in to change notification settings - Fork 454
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
Why it downloads Gradle when I open a single java file #901
Comments
This is most likely caused by eagerly activating the Buildship plugin when the server initializes. There might be ways to delay that activation (same thing for M2E) but it might be tricky |
@fbricon downloading stuff from fixed locations is a problem in airgapped or disconnected cases. Can we ensure somehow we can override all downloads or make sure required stuff is local already? Like we do for maven repos in the maven config in ~/.m2? |
@tsmaeder You can try to set the following file - https://services.gradle.org/versions/all |
@snjeza Buildship also has an offline preference, we should expose as a jdt.ls setting too. Can you please look into it? |
I don't understand what you mean. Can you rephrase, @snjeza ? |
If there isn't ~/.tooling/gradle/versions.json, Buildship downloads it from https://services.gradle.org/versions/all. @fbricon it will do it without checking any preferences. |
@Eskibear you can try to create C:\Users<your_username>.tooling\gradle\versions.json. It can be empty if you don't use Gradle. |
The Buildship Offline Mode preference starts a gradle build with the --offline option. See #1157 |
Ok @snjeza , @fbricon thanks for the info. --offline is not what we need for "airgapped". Airgapped is an enironment where you have for example a company intranet, but are not connected to the internet, so we'd have to replace remote servers (repos) with local ones (like we can do in the maven settings). Would |
@tsmaeder you may want to take a look at https://chengl.com/gradle-offline-build/ or http://whataboutprogramming.com/work-offline-with-gradle.html |
@snjeza "offline" is not what we're looking for. We need "airgapped", basically a way to set it up that when a project tries to resolve a project from maven central, it goes to a server somewhere on the local network. Do you happen to know how that can be set up per user or globally? |
The issue is found when I'm using a VM without network access. It's a clean installed Windows, OpenJDK 8u202, VS Code 1.33.1, vscode-java is the only extension installed.
When I open a .java file, vscode activates the extension, and there's an error in the log. Attaching the full log: vscode-java-no-network.log
Why does it have to download the Gradle when I'm not opening a gradle project? IMO it would be good if the downloading only happens when I'm working on a gradle project.
The text was updated successfully, but these errors were encountered: