Reputation: 790
I would like to know if it's possible check which Java version my Maven is using to build the project.
The JAVA_HOME
was set to JDK 1.8.
In pom.xml I have this properties configured:
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
I try figured out a way to check it in mvn logs, but I can't find whitch version was used.
How to know the Java version throught some kind of mvn logs.
I appretiate any support.
Upvotes: 1
Views: 5748
Reputation: 44
Depending on where you build the project, in command line it would use the JAVA_HOME setting, in IDE it would use IDE settings for the project, e.g. in IDEA, go to Project Settings page (File -> Project Structure), you can check the Project SDK & Project language level settings on "Project" & "Modules" page, that shows which SDK & language level the current project used.
Upvotes: 0
Reputation: 150
In your command line if you run mvn -v
it shows something like
Maven home: C:\maven\apache-maven-3.6.3\bin\..
Java version: 15.0.1, vendor: Oracle Corporation, runtime: C:\java\jdk-15.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Upvotes: 2