title: Setting the Java Version in Maven with system Java version as 11.0
body: <p>I am currently using jdk version as 11 in my local machine, Set using JAVA_HOME.</p>
  
  <p>I need to run a maven project with java_version as 9. 
  for doing the same took reference from <a href="https://www.baeldung.com/maven-java-version" rel="nofollow noreferrer">https://www.baeldung.com/maven-java-version</a></p>
  
  <p>here is my pom.xml file</p>
  
  <pre><code>&lt;properties&gt;
      &lt;java.version&gt;8&lt;/java.version&gt;
      &lt;maven.compiler.plugin.version&gt;3.8.0&lt;/maven.compiler.plugin.version&gt;
  &lt;/properties&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven.compiler.plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;release&gt;8&lt;/release&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>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</p>
  
  <pre><code>Manifest-Version: 1.0
  Archiver-Version: Plexus Archiver
  Created-By: Apache Maven 3.5.0
  Built-By: test
  Build-Jdk: 11.0.2
  </code></pre>
  
  <p>Why it is still picking java version as 11, why not 8?</p>