redhat-developer / redhat-developer/vscode-java
Resources (application.properties) automatically deleted from bin folder shortly after generation in Gradle project
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
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:
- Open a Gradle multi-module project in VS Code.
- Run the command:
Java: Clean Java Language Server Workspace. - Open the file explorer and navigate to the output directory (e.g.,
project/bin/main). - Observe that
application.propertiesis generated. - Wait for about 5 seconds.
- The file disappears from the folder automatically.
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riprodurre il problema in un progetto Gradle multimodulo Windows 11 con Java: eseguire Clean Java Language Server Workspace, quindi esaminare i log del language server confrontando il contenuto generato di bin/main con .\gradlew.bat processResources. Usare come punto di partenza il comportamento segnalato della cartella di output e della sincronizzazione. Il lavoro è completato quando application.properties rimane nella cartella di output dopo la sincronizzazione in background ed è disponibile per l'esecuzione e il debugging.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript
- Ambito
- build-system, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100