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

Stuck on "5% Update project ..." for a long time #1102

Closed
abkieling opened this issue Oct 16, 2019 · 14 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#1217
Closed

Stuck on "5% Update project ..." for a long time #1102

abkieling opened this issue Oct 16, 2019 · 14 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#1217

Comments

@abkieling
Copy link

abkieling commented Oct 16, 2019

After adding a new Maven dependency to pom.xml, a message saying "5% Update project ..." is shown in the status bar and takes a long time to complete. The plugin doesn't react quickly to dependency changes.

Environment
  • Operating System: Fedora 30
  • JDK version: 1.8
  • Visual Studio Code version: 1.39.2
  • Java extension version: 0.50.0
Steps To Reproduce
  1. git clone git@github.com:apache/camel.git
  2. Open components/camel-http project in VS Code
  3. Open pom.xml
  4. Add or remove a dependency
Current Result

The classes from the new dependency aren't available for a long time.

Expected Result

The classes from the new dependency should be available quickly.

Additional Informations

I don't think the long delay is due to downloading the new dependency. The same issue happens with already downloaded dependencies.

@snjeza
Copy link
Contributor

snjeza commented Oct 16, 2019

I can't reproduce the issue.
@alexkieling Could you provide a log - https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting#enable-logging

@abkieling
Copy link
Author

The logs don't show any error.

@snjeza
Copy link
Contributor

snjeza commented Oct 16, 2019

Could you provide a project example?

@snjeza
Copy link
Contributor

snjeza commented Oct 16, 2019

The logs don't show any error.

It isn't important. Could you attach it?

@abkieling
Copy link
Author

I've updated the steps to reproduce the issue. It happens when working on an Apache Camel component.

@snjeza
Copy link
Contributor

snjeza commented Oct 16, 2019

Apache Camel is a big project. It has 800+ maven modules. If you change root pom.xml, m2e (Java LS) updates all projects.
@alexkieling could you try to include only required folders/projects. See #1084 and eclipse-jdtls/eclipse.jdt.ls#1200

@abkieling
Copy link
Author

abkieling commented Oct 17, 2019

I'm not opening the main project, just one of the component projects. Having said that, the component projects reference a components' parent pom. Maybe that's causing the issue?

@snjeza
Copy link
Contributor

snjeza commented Oct 17, 2019

What project did you open?

@abkieling
Copy link
Author

I'm working on a new component here but have tested changing the pom of an existing component (camel-http) and the same behavior was seen.

@snjeza snjeza self-assigned this Oct 17, 2019
@snjeza
Copy link
Contributor

snjeza commented Oct 17, 2019

@alexkieling Could you test test the issue using https://raw.githubusercontent.com/snjeza/vscode-test/master/java-0.52.0.vsix?

@abkieling
Copy link
Author

The issue doesn't happen when using the version 0.52.0 you provided.

@snjeza
Copy link
Contributor

snjeza commented Oct 17, 2019

@alexkieling Thanks.
The issue happens because Java LS forcibly updates Snapshots/Releases.

@fbricon
Copy link
Collaborator

fbricon commented Dec 3, 2019

A new java.maven.updateSnapshots preference was added, set to false by default. When set to true, it forces an update of Snapshots/Releases.

@Foxhunter981
Copy link

This issue is happening for me again in version 1.8.0. I imported another submodule and found that attempting to update the project would start a process that would freeze up at 5%. It has been like this for a long time. No logs to indicate the problem.
image

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