vscode-maven
vscode-maven copied to clipboard
Intellisense uninformed about the change in Maven project's Java version
Describe the bug A clear and concise description of what the bug is. I edit the version string in pom.xml and compile the project successfully, but then still the intellisense is on the wrong version of Java.
To Reproduce Steps to reproduce the behavior:
- Start a project using quick-archetype.
- Add some code and compile.
- Change the Java version in pom.xml
- Error on a method reference: Method references are allowed only at source level 1.8 or above.
Expected behavior Since I have updated the Java version to 1.8, I expect not to see the Intellisense error.
Environments (please complete the following information as much as possible):
- OS: [e.g. Windows 10/Linux/OS X] Windows 10
- VS Code version: [e.g. 1.24.0] 1.60.2
- Extension version [e.g. 0.9.0] 0.34.0
Screenshots
If applicable, add screenshots to help explain your problem.

Changing the version in .settings/org.eclipse.jdt.core.prefs (as mentioned here as well) fixed my issue, but I'll keep this issue open since I think it's an unintuitive process.
the intellisense is provided by vscode-java extension. AFAIK, after you change pom.xml, projects will be updated automatically. Please check if you have changed setting java.configuration.updateBuildConfiguration.
java.configuration.updateBuildConfiguration : Specifies how modifications on build files update the Java classpath/configuration. Supported values are disabled (nothing happens), interactive (asks about updating on every modification), automatic (updating is automatically triggered).
From: https://github.com/redhat-developer/vscode-java#supported-vs-code-settings
No, I just checked and I had not changed that setting (now I will set it to automatic however, just in case the same thing occurs again, hopefully this will fix it. I think it must be their default though.) Anyway, thank you for your response.