You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
src/main/resources excluded from classpath for Gradle subprojects with generated source directories #4393
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.
Activity
David-N-Perkins commentedon Apr 15, 2026
I also believe this is the root cause for an issue I'm seeing with unit tests.
The class loader can't find any test resources, because they are getting excluded from the test build. Works fine on version
1.53.0.bantu commentedon Apr 20, 2026
Confirming
broken: 1.54.0
not broken: 1.53.0
snjeza commentedon Apr 20, 2026
@mmayfield-stratusdata @bantu Could you try to add
to settings.json
datho7561 commentedon Oct 15, 2026
Fixed by eclipse-jdtls/eclipse.jdt.ls#3765