src/main/resources excluded from classpath for Gradle subprojects with generated source directories
Mantenedores costumam responder em até 1 dia
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Describe the bug
After updating the VS Code extension to 1.54.0, I started seeing issues with my Java application re: Liquibase. The specific error was a failur to run with Failed to configure a DataSource: 'url' attribute is not specified. but after some digging with the help of an LLM it seems that the cause was that excluding='**' was being added to the entries in .classpath/src/main/resources.
It only happened with one subproject; the agent sugested that the excluding is only added when there is a generated source dir on the build path (like build/generated/sources/dgs-codegen).
To Reproduce
The LLM created these steps and I agree that they describe my situation:
- Open a multi-module Gradle project in VS Code with redhat.java 1.54.0
- Ensure at least one subproject has a generated source directory on its build path (e.g. DGS codegen, annotation processing)
- Wait for "Java: Ready"
- Open the generated .classpath for that subproject in the JDT workspace storage (at ~/Library/Application Support/Code/User/workspaceStorage//redhat.java/jdt_ws/.metadata/.plugins/org.eclipse.core.resources/.projects//.classpath)
- Observe that src/main/resources has excluding="**" on its entry, while a sibling subproject without generated sources does not
The practical consequence for Spring Boot projects: the app fails to start because application.yml is not on the classpath (Tomcat defaults to port 8080, datasource properties are unresolved).
Unfrotunately I don't have a sample project to attach; mine is a closed source application.
Expected behavior
Just like in 1.53.0, src/main/resources doesn't use excluding="**", and resource files are copied to the output dir during compilation so they're available at runtime.
Screenshots
N/A
Environment
- Operating System: macOS 15.6 (Apple Silicon, arm64)
- JDK version: 17.0.18
- Visual Studio Code version: 1.116.0
- Java extension version: 1.54.0 (doesn't work) / 1.53.0 (works)
Additional Information
The excluding prop is added with both java.gradle.buildServer.enabled: "auto" and java.gradle.buildServer.enabled: "off"
- Linguagem predominante
- TypeScript
- Estrelas
- 2.3k
- Forks
- 549
- Merge médio
- 8h 20min
- PRs com merge (30d)
- 6
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de redhat-developer/vscode-java
-
JDK_HOME can be sorted after lower-priority auto-detected JDK sourcesTalvez já em andamento @shblue21 assumiu há 117 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
redhat-developer/vscode-java#4426 ·
Mantenedores costumam responder em até 1 dia
-
Java template regressionAbertabug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
redhat-developer/vscode-java#4539 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
redhat-developer/vscode-java#4537 ·
Mantenedores costumam responder em até 1 dia
-
bug Lombok
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 52/100
redhat-developer/vscode-java#4521 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug need info
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
redhat-developer/vscode-java#4520 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de redhat-developer/vscode-java
Issues semelhantes
-
effort:S priority:P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
cameri/nostream#811 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
dam-agents/dam#4562 ·
Mantenedores costumam responder em até 1 dia
-
bug p3 triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
bug javascript P2-medium python release:v3.1
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
adrirubio/claude-deck#546 ·
Mantenedores costumam responder em até 1 dia