Skip to content
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

Dependencies incorrectly marked as unresolved in build.gradle file #2126

Closed
brendansailer opened this issue Sep 22, 2021 · 17 comments
Closed

Comments

@brendansailer
Copy link

brendansailer commented Sep 22, 2021

Hello - I'm getting unresolved dependency "problems" in the problem viewer next to the terminal at the bottom of vscode. There's nothing wrong with the build.gradle file as I can successfully run gradle tasks using the terminal. I have over 20 of these problems (both with external and internal dependencies) and they look like this:

Unresolved dependency: org.springframework:spring-expression:5.0.8.RELEASE

I'm confused by the errors in the logs I'm getting because I have settings which should use my local Gradle version (rather than downloading one):

    "java.import.gradle.enabled": true,
    "java.import.gradle.wrapper.enabled": false,
    "java.import.gradle.version": "5.6.4",
    "java.import.gradle.home": "/opt/gradle/5.6.4/bin",

My company machine has fairly strict traffic rules, so I think some of the requests are getting blocked, so I thought that using a local gradle version would work. Thank you for the help!

Environment
  • Operating System: Centos 7
  • JDK version: JDK 11
  • Visual Studio Code version: 1.53.4
  • Java extension version: v0.82.0
Steps To Reproduce
  1. Open a Java project that you can run gradle tasks from the command line.
  2. See errors in the "Problems" tab of vscode.

The build.gradle file (the versions come from gradle.properties):

dependencies {
    ...
    implementation "org.slf4j:slf4j-api:${slf4jVersion}"
	
    implementation "org.springframework:spring-beans:${springVersion}"
    implementation "org.springframework:spring-context:${springVersion}"
    implementation "org.springframework:spring-core:${springVersion}"
    ...
}

Logs:

[Trace - 11:57:17 AM] Sending request 'initialize - (0)'.
[Trace - 11:57:22 AM] Received notification 'window/logMessage'.
[Warn  - 11:57:22 AM] Sep 22, 2021, 11:57:22 AM Could not load Gradle version information
Cannot download published Gradle versions.
org.gradle.api.UncheckedIOException: Cannot download published Gradle versions.
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.downloadVersionInformation(PublishedGradleVersions.java:165)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.tryToDownloadAndCacheVersions(PublishedGradleVersions.java:149)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.create(PublishedGradleVersions.java:109)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersionsWrapper$LoadVersionsJob.run(PublishedGradleVersionsWrapper.java:60)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.net.UnknownHostException: services.gradle.org
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:220)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
	at java.base/java.net.Socket.connect(Socket.java:591)
	at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:285)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
	at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:265)
	at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:372)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1075)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1581)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.downloadVersionInformation(PublishedGradleVersions.java:162)
	... 4 more

[Trace - 11:57:22 AM] Received response 'initialize - (0)' in 5173ms.
[Trace - 11:57:22 AM] Sending notification 'initialized'.
[Trace - 11:57:22 AM] Sending notification 'workspace/didChangeConfiguration'.
[Trace - 11:57:23 AM] Received notification 'language/status'.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received notification 'language/status'.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received notification 'language/status'.
[Trace - 11:57:23 AM] Received notification 'language/status'.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (1)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (1)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (2)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (2)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (3)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (3)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (4)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (4)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (5)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (5)'. Processing request took 1ms
[Trace - 11:57:23 AM] Sending request 'workspace/executeCommand - (1)'.
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (6)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (6)'. Processing request took 1ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (7)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (7)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (8)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (8)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (9)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (9)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (10)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (10)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (11)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (11)'. Processing request took 1ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (12)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (12)'. Processing request took 1ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (13)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (13)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (14)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (14)'. Processing request took 0ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (15)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (15)'. Processing request took 1ms
[Trace - 11:57:23 AM] Received request 'client/registerCapability - (16)'.
[Trace - 11:57:23 AM] Sending response 'client/registerCapability - (16)'. Processing request took 1ms
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received response 'workspace/executeCommand - (1)' in 65ms.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received notification 'language/status'.
[Trace - 11:57:23 AM] Sending request 'workspace/executeCommand - (2)'.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received notification 'language/progressReport'.
[Trace - 11:57:23 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:23 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:23 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received response 'workspace/executeCommand - (2)' in 97ms.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 11:57:24 AM] Received request 'client/registerCapability - (17)'.
[Trace - 11:57:24 AM] Sending response 'client/registerCapability - (17)'. Processing request took 1ms
Current Result

20+ of these "problems": Unresolved dependency: org.springframework:spring-expression:5.0.8.RELEASE

Expected Result

No errors

@testforstephen
Copy link
Collaborator

The Java extension finds a gradle distribution in the following order:

  1. Use wrapper if the setting "java.import.gradle.wrapper.enabled" is enabled.
  2. Download the version of the setting "java.import.gradle.version".
  3. Use Gradle from the specified local installation directory of "java.import.gradle.home".

Since you want to use local gradle, you should leave "java.import.gradle.version" empty and configure your gradle home with "java.import.gradle.home": "/opt/gradle/5.6.4" (don't include the bin).

@brendansailer
Copy link
Author

Thank you for the tips! Here are my settings now:

{
    "editor.fontSize": 12,
    "files.autoSave": "afterDelay",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "java.home": "/opt/jdk/jdk11",
    "java.import.gradle.enabled": true,
    "java.import.gradle.wrapper.enabled": false,
    "java.import.gradle.home": "/opt/gradle/5.6.4",
    "gradle.autoDetect": "on",
    "redhat.telemetry.enabled": false,
    "java.trace.server": "messages",
    "diffEditor.ignoreTrimWhitespace": false
}

However, I'm still getting the unresolved dependency issue in the build.gradle file and it looks like the plugin is still trying to download an external gradle version:

[Warn  - 10:51:42 AM] Sep 28, 2021, 10:51:42 AM Could not load Gradle version information
Cannot download published Gradle versions.
org.gradle.api.UncheckedIOException: Cannot download published Gradle versions.
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.downloadVersionInformation(PublishedGradleVersions.java:165)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.tryToDownloadAndCacheVersions(PublishedGradleVersions.java:149)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.create(PublishedGradleVersions.java:109)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersionsWrapper$LoadVersionsJob.run(PublishedGradleVersionsWrapper.java:60)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.net.UnknownHostException: services.gradle.org
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:220)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
	at java.base/java.net.Socket.connect(Socket.java:591)
	at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:285)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
	at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:265)
	at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:372)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1075)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1581)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.downloadVersionInformation(PublishedGradleVersions.java:162)
	... 4 more

Is this just a check to see what gradle versions are available? I feel like if I have a local gradle version installed that I know I want to use that version so it shouldn't need to check using the network.

@brendansailer
Copy link
Author

I've also added the following line to my settings file:

"java.import.gradle.user.home": "/home/brendan/.gradle",

I have the environmental variable GRADLE_USER_HOME set properly, so I don't think this does anything but I wanted to see if it could account for why it can't find the dependencies in that directory under /caches

@snjeza
Copy link
Contributor

snjeza commented Oct 4, 2021

@brendansailer you may want to take a look at #1495 and #901

@brendansailer
Copy link
Author

@snjeza Hmmm I just tried those settings without luck. I have "java.import.gradle.offline.enabled": true and have the proper file in ~/.tooling/gradle/versions.json. Is there something else?

@snjeza
Copy link
Contributor

snjeza commented Oct 5, 2021

@brendansailer Could you try to create ~/.cache/tooling/gradle/versions.json

touch ~/.cache/tooling/gradle/versions.json

See eclipse-jdtls/eclipse.jdt.ls#1655

@brendansailer
Copy link
Author

brendansailer commented Oct 5, 2021

@snjeza Ah thank you for the tip - it fixed that error in the logs (once I moved the versions.json file to the cache directory)! My apologies for being new to OSS - I've learned a lot from opening a handful of issues across various vscode gradle extensions. I definitely will use the search bar before opening any more issues. Up next is contributing for me :)

Now I'm getting no errors in the logs, yay! However, the dependencies are still being marked as unresolved despite the fact that I can run gradle commands from the command line (meaning the dependencies can be resolved). See below:

depdencyerror

This problem can be annoying because I can't tell if dependencies are actually unresolved. I believe I have all the settings configured properly (see comments above), but please let me know if you want me to try anything.

@snjeza
Copy link
Contributor

snjeza commented Oct 5, 2021

@brendansailer Could you check if there is ~/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/*/spring-expression-5.0.8.RELEASE.jar and show your .classpath file?

@brendansailer
Copy link
Author

brendansailer commented Oct 5, 2021

@snjeza Yes, I have a spring-expression-5.0.8.RELEASE.jar and a spring-expression-5.0.8.RELEASE-javadoc.jar with a spring-expression-5.0.8.RELEASE-sources.jar spread out across 3 different directories following the path you provided above.

Here's my .classpath file (snippet):

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry output="bin/main" kind="src" path="src/main/java">
		<attributes>
			<attribute name="gradle_scope" value="main"/>
			<attribute name="gradle_used_by_scope" value="main,test"/>
		</attributes>
	</classpathentry>
	<classpathentry output="bin/test" kind="src" path="src/test/java">
		<attributes>
			<attribute name="gradle_scope" value="test"/>
			<attribute name="gradle_used_by_scope" value="test"/>
			<attribute name="test" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry output="bin/test" kind="src" path="src/test/resources">
		<attributes>
			<attribute name="gradle_scope" value="test"/>
			<attribute name="gradle_used_by_scope" value="test"/>
			<attribute name="test" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
	<classpathentry kind="output" path="bin/default"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
	<classpathentry sourcepath="/home/brendan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/5924cb7bf1a4168a8b2bcd22db7d4a57e5901f68/spring-expression-5.0.8.RELEASE-sources.jar" kind="lib" path="/home/brendan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/f23158f22c917df2cddf2ecebc398a9e95f95fae/spring-expression-5.0.8.RELEASE.jar">
		<attributes>
			<attribute name="javadoc_location" value="jar:file:/home/brendan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/71a597f8f1c7b70d7b1ea59174764ab8d9cb14fa/spring-expression-5.0.8.RELEASE-javadoc.jar!/"/>
			<attribute name="gradle_used_by_scope" value="main,test"/>
		</attributes>
	</classpathentry>
</classpath>

Please let me know if you need anything further! Several other of my teammates who also work in this network-constrained VM environment also have the same problem, so I really appreciate your help. Lmk if you need more of the .classpath file.

@snjeza
Copy link
Contributor

snjeza commented Oct 5, 2021

@brendansailer could show your build.gradle, gradle.propertie and .settings/org.eclipse.buildship.core.prefs?

@brendansailer
Copy link
Author

brendansailer commented Oct 5, 2021

@snjeza Sure! My build.gradle (removed some dependencies/extraneous stuff since it got long):

buildscript {
    dependencies {
        classpath [Several custom Plugins here]
    }
}

apply plugin: 'java'
apply plugin: 'application'
...

configurations {
    bootDistro
    bootDistro.transitive    = false
    ...
}

dependencies {
    implementation "org.springframework:spring-beans:${springVersion}"
    implementation "org.springframework:spring-context:${springVersion}"
    implementation "org.springframework:spring-core:${springVersion}"
    ...
	runtimeOnly "org.springframework:spring-expression:${springVersion}"
    ...
	testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
	testImplementation "org.mockito:mockito-core:${mockitoVersion}"
	testImplementation "org.mockito:mockito-junit-jupiter:${mockitoVersion}"
	testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
	testImplementation "junit:junit:4.12"
	testImplementation 'org.xmlunit:xmlunit-core:2.6.3'
}

test {
	useJUnitPlatform()
}

task run(dependsOn: 'installDist', type: Exec) {
    ...
}

jar {
   manifest {
       attributes "Implementation-Version": version
   }
}

distributions {
    main {  
        contents {
            ...
        }
    }
    ...
}

.....

artifacts {
    archives distTar {
        compression = Compression.GZIP
    }
    ...
}

eclipse { 
    classpath {  
        downloadJavadoc = true
        downloadSources = true
    }
}

My gradle.properties (removed some for simplicity):

...
jaxbVersion                                 = 2.2.11
apacheCommonsIoVersion          = 2.5
apacheCommonsLoggingVersion = 1.2
...
springVersion                 = 5.0.8.RELEASE
junitVersion                   = 5.4.2
mockitoVersion             = 3.0.0
xmlunitVersion              = 2.6.3

My .settings/org.buildship.core.prefs:

arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(LOCAL_INSTALLATION(/opt/gradle/5.6.4))
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=/home/brendan/.gradle
java.home=/opt/jdk/jdk11
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true

It looks like I messed up the spacing a little editing it here. Also, I removed some things that aren't important. Thanks for the help!

@snjeza
Copy link
Contributor

snjeza commented Oct 6, 2021

My .settings/org.buildship.core.prefs:

offline.mode=false

@brendansailer Could you try to set the following VS Code property:

"java.import.gradle.offline.enabled": true,

and remove the following:

eclipse { 
    classpath {  
        downloadJavadoc = true
        downloadSources = true
    }
}

@brendansailer
Copy link
Author

@snjeza I removed that last bit in my build.gradle and already had "java.import.gradle.offline.enabled": true, in my settings.

When I reload vscode, all my imports in my Java classes are unresolved and I have the same error as before in my build.gradle. I ran "gradle eclipse" which resolved the dependencies in my Java files, but I still have unresolved dependencies in the build.gradle file. The problem is that they're actually resolvable since I can run gradle commands without error, but vscode thinks they're unresolved.

@snjeza
Copy link
Contributor

snjeza commented Oct 6, 2021

I can't reproduce the issue.

  • settings.json
    "java.import.gradle.enabled": true,
    "java.import.gradle.wrapper.enabled": false,
    "java.import.gradle.version": "5.6.4",
    "java.import.gradle.home": "/home/snjeza/gradle-5.6.4",
    "java.import.gradle.offline.enabled": true,
  • build.gradle
plugins {
    id 'java'
    id 'application'
}

repositories {
    jcenter()
}

dependencies {
    implementation 'com.google.guava:guava:28.0-jre'
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
    implementation "org.springframework:spring-beans:5.0.8.RELEASE"
    implementation "org.springframework:spring-context:5.0.8.RELEASE"
    implementation "org.springframework:spring-core:5.0.8.RELEASE"
    runtimeOnly "org.springframework:spring-expression:5.0.8.RELEASE"

}

application {
    mainClassName = 'gradletest.App'
}

test {
    useJUnitPlatform()
}
eclipse {
    classpath {
        downloadJavadoc = true
        downloadSources = true
    }
}
ls  ~/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/*
/home/snjeza/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/5924cb7bf1a4168a8b2bcd22db7d4a57e5901f68:
spring-expression-5.0.8.RELEASE-sources.jar

/home/snjeza/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/71a597f8f1c7b70d7b1ea59174764ab8d9cb14fa:
spring-expression-5.0.8.RELEASE-javadoc.jar

/home/snjeza/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/e82848e444daf0de4302bae081adfca0e362babc:
spring-expression-5.0.8.RELEASE.pom

/home/snjeza/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.8.RELEASE/f23158f22c917df2cddf2ecebc398a9e95f95fae:
spring-expression-5.0.8.RELEASE.jar
  • disconnect from Internet
cd gradletest
rm -rf .gradle/ .classpath .settings/ .project bin/
rm -rf ~/.config/Code/User/workspaceStorage/
code .

@snjeza
Copy link
Contributor

snjeza commented Oct 6, 2021

I removed that last bit in my build.gradle and already had "java.import.gradle.offline.enabled": true, in my settings.

@brendansailer could you check .settings/org.eclipse.buildship.core.prefs

...
offline.mode=true
...

@brendansailer
Copy link
Author

@snjeza I'll get back to you after I do more investigation! I also tried changing orffline.mode=true without luck. I appreciate the help - I'll ping you once I dig deeper into the problem!

Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants