-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to use specific Java SDK to run Maven #992
Comments
I'm also aware that the spring boot applications can have mvnw.cmd file, and in that file I can add SET JAVA_HOME=C:\Java\jdk-20.0.1 so that the build works for each project independently. However, if a project would change Java, it would be necessary not only to change the pom.xml, but also mvnw.cmd and mvnw. Not only that, all developer that use Windows would have to have Java placed in the same folder and all the developers that use Linux would have to have Java placed in the same directory which makes this approach unusable. |
Is it possible to automatically get the jdk version used by the project and then utilize the existing |
For your information, since Java 9, even if you specify the latest JDK in
(*a) The
source: Java Extension Pack Auto Config > Specify Project Java Version |
I'm confused about the
and set
mvn commond will use the user profile setting:
when I remove
if there is a setting make |
"maven.terminal.customEnv": [ If this property is set in vscode's workspace setttings, then any maven project in that workspace will use this jdk and not the one set in your user environment variables. However, if this property is not set then maven will use your env vars path for java home |
Type: Feature Request
Hello,
Sometimes in the development process it is needed to have 2 different versions of Java Maven projects. Further more, sometimes it is crucial to build the application running Maven with the specific Java.
Currently, there is a way to set up maven path (
maven.executable.path
) and to set its Java path:However, I'm in a situation where I really need to run maven build for one project with one Java version and another project where I need to run maven with another Java version. If I want to do that, I constantly need to change the value for JAVA_HOME. I would like to avoid that.
Extension version: 0.42.0
VS Code version: Code 1.81.0 (6445d93c81ebe42c4cbd7a60712e0b17d9463e97, 2023-08-02T12:37:13.485Z)
OS version: Windows_NT x64 10.0.19045
Modes:
The text was updated successfully, but these errors were encountered: