microsoft / vscode-maven

VSCode extension "Maven for Java"
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven
Other
188 stars 92 forks source link

maven.terminal.useJavaHome looks at java.home #1041

Open ghost opened 10 months ago

ghost commented 10 months ago

Describe the bug The setting maven.terminal.useJavaHome looks at java.home which is deprecated and should look for java.jdt.ls.java.home

To Reproduce Steps to reproduce the behavior:

  1. Configure java.jdt.ls.java.home in a workspace settings file
  2. Configure maven.terminal.useJavaHome to true in the same settings file
  3. use maven command

Expected behavior The maven plugin would check the current VS Code java home setting.

Environments (please complete the following information as much as possible): Version: 1.91.1 (user setup) Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:06:49.809Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.22631

Screenshots

Additional context Developing Java projects that use installations of Java, Tomcat and Maven relative to my workspace.

cypher256 commented 10 months ago

Considering why java.home was changed to java.jdt.ls.java.home, Maven should avoid using java.jdt.ls.java.home. Also, in the near future RedHat's embedded JRE will be version 21, so using java.jdt.ls.java.home will be confusing.

Related issue: