I am currently using jdk version as 11 in my local machine, Set using JAVA_HOME.
I need to run a maven project with java_version as 9. for doing the same took reference from https://www.baeldung.com/maven-java-version
here is my pom.xml file
<properties>
<java.version>8</java.version>
<maven.compiler.plugin.version>3.8.0</maven.compiler.plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<release>8</release>
</configuration>
</plugin>
</plugins>
</build>
Then i ran the command "mvn clean install" and the jar file generated is having java-version as 11 in its manifest file. here is the snippet of Manifest file of the gemnerated jar
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven 3.5.0
Built-By: test
Build-Jdk: 11.0.2
Why it is still picking java version as 11, why not 8?