redhat-developer / redhat-developer/vscode-java

Resources (application.properties) automatically deleted from bin folder shortly after generation in Gradle project

Abierto
#4,398 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug
Lenguaje dominante
TypeScript
Estrellas
2.3k
Forks
546
Merge medio
20 h 1 min
PR fusionados (30 d)
11

Descripción

Describe the bug
In a Gradle multi-module project environment, the application.properties file is correctly auto-generated/copied into the bin/main folder after a "Clean Java Language Server Workspace" command or project build. However, after approximately 5-10 seconds, the file is automatically deleted from the disk without any user interaction.
To Reproduce
Steps to reproduce the behavior:

  1. Open a Gradle multi-module project in VS Code.
  2. Run the command: Java: Clean Java Language Server Workspace.
  3. Open the file explorer and navigate to the output directory (e.g., project/bin/main).
  4. Observe that application.properties is generated.
  5. Wait for about 5 seconds.
  6. The file disappears from the folder automatically.
Image Image Image

Expected behavior
The language server should copy resources from src/main/resources to the output folder and ensure they persist there for the application to use during runtime and debugging.

Environment

  • Operating System: Windows 11
  • JDK version: 25
  • Visual Studio Code version: v1.104.0
  • Java extension version: v1.54.0

Additional Information

  • This issue occurs specifically in a Gradle setup where the Language Server (Eclipse JDT.LS) seems to have a conflict with the internal build/sync process.
  • Attempting to set a separate output folder (e.g., bin/main/) results in a "Cannot nest output folder" error.
  • The logs show a warning: WARNING: Reflective call to EquinoxBundle#getModuleClassLoader(boolean) detected.
  • A temporary workaround is manually running .\gradlew.bat processResources, but the file is eventually deleted again by the language server's background synchronization.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproduzca el problema en un proyecto Gradle multimódulo de Windows 11 con Java: ejecute Clean Java Language Server Workspace y, después, inspeccione los registros del servidor de lenguaje mientras compara el contenido generado de bin/main con .\gradlew.bat processResources. Use como punto de partida el comportamiento notificado de la carpeta de salida y de la sincronización. Se considera completado cuando application.properties permanece en la carpeta de salida después de la sincronización en segundo plano y está disponible para la ejecución y la depuración.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java, typescript
Área
build-system, tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.