redhat-developer / redhat-developer/vscode-java
"Project cannot be built until its prerequisite is built" errors each time I close & open VSCode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I have a multi-module Maven project that I created using Eclipse, and now I am trying to migrate to VSCode.
I have opened the project in VSCode, and it has updated all .project and .classpath files. There is no error in the project, and everything seems to work perfectly.
But after I close VSCode and open it again, without having changed a single line, after Java builds everything, suddenly most of the modules are in red, and I see this type of error in the Problems tab:
"The project cannot be built until its prerequisite XXX is built. Cleaning and building all projects is recommended"
If I "Clean Java Language Server Workspace", the problems disappear, until I close+open VSCode again.
If I "Force Java Compilation > Full", the same. Problems disappear until the next restart.
I guess this shouldn't happen, but I don't know if it is a problem in my project (as I've said, everything works until I close the workspace), I have something configured incorrectly or it is a bug in vscode-java (and if so, if there's any workaround).
I am using JDK 8.
I have tried the pre-release version too, but I get the same problems.
Thank you in advance, please let me know if you need more info.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the multi-module Maven project after reopening VSCode, comparing the .project and .classpath files before and after Java builds. Check whether cleaning the Java Language Server Workspace or using Force Java Compilation > Full changes the result. Done means identifying the restart-related cause or a reliable workaround for the prerequisite errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- build-system, developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100