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

Classpath resources not copied after LS restart #2857

Closed
dsyer opened this issue Jan 5, 2023 · 6 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#2390
Closed

Classpath resources not copied after LS restart #2857

dsyer opened this issue Jan 5, 2023 · 6 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#2390
Assignees

Comments

@dsyer
Copy link

dsyer commented Jan 5, 2023

Environment
  • Operating System: Linux
  • JDK version: 17
  • Visual Studio Code version: 1.73.1
  • Java extension version: v1.14.2022122003
Steps To Reproduce
  1. Open a Maven project with resources in src/main/resources
  2. mvn clean in a terminal (deletes target/classes)
  3. Ctrl-P "Java: Restart Language Server Workspace"
  4. Observe contents of target/classes - compiled .class files but no resources
Additional Informations

Workaround: Ctrl-P "Developer: Reload Window" appears to fix it (as does mvn resources:resources).

@fbricon
Copy link
Collaborator

fbricon commented Jan 5, 2023

looks similar to eclipse-m2e/m2e-core#1150. Do you have a .mvn folder?

@dsyer
Copy link
Author

dsyer commented Jan 5, 2023

No, I tried it with and without .mvn. Same outcome.

@fbricon
Copy link
Collaborator

fbricon commented Jan 5, 2023

Mm can't reproduce with 1.13 or 1.14-pre-release. On restart the resources are under target/classes as expected, although I don't see any .class files.
Did you turn off autobuild ("java.autobuild.enabled" setting)?
Have you tried switching to pre-release?
Can you provide a sample project reproducing the error?

@dsyer
Copy link
Author

dsyer commented Jan 5, 2023

Sample project is any project generated from start.spring.io. I have tried pre-release (that's where I started and then I downgraded but it didn't fix it). My settings (just the "java.*" ones):

{
    "java.configuration.updateBuildConfiguration": "interactive",
    "java.compile.nullAnalysis.mode": "disabled",
    "java.debug.settings.vmArgs": "-noverify",
    "[java]": {
        "editor.defaultFormatter": "redhat.java"
    },
    "java.import.gradle.enabled": false,
    "java.completion.favoriteStaticMembers": [...],
    "java.jdt.ls.vmargs": "-Xmx4096m",
    "java.refactor.renameFromFileExplorer": "autoApply",
    "java.requirements.JDK11Warning": false,
    "java.configuration.checkProjectSettingsExclusions": false,
    "java.semanticHighlighting.enabled": true,
    "java.project.importOnFirstTimeStartup": "automatic",
    "maven.executable.preferMavenWrapper": true,
    "java.dependency.packagePresentation": "hierarchical",
    "java.dependency.showMembers": true,
...
}

@snjeza
Copy link
Contributor

snjeza commented Jan 5, 2023

@dsyer
Copy link
Author

dsyer commented Jan 6, 2023

That works, thank you.

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

Successfully merging a pull request may close this issue.

4 participants