redhat-developer / redhat-developer/vscode-java

src/main/resources excluded from classpath for Gradle subprojects with generated source directories

Đang mở
#4,393 3 bình luận 1 reaction 1 người được giao Xem trên GitHub

@snjeza đang làm issue này rồi.

Từ ngày 20/4/2026.

bug
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

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:


  1. Open a multi-module Gradle project in VS Code with redhat.java 1.54.0
  2. Ensure at least one subproject has a generated source directory on its build path (e.g. DGS codegen, annotation processing)
  3. Wait for "Java: Ready"
  4. 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)
  5. 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"

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.