I am using below maven compiler plugin to compile my java code:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
My java_home points to Java 7.
My first question, will my classes be compiled with java 6 or java 7?
If with java 6 (because of <source>1.6</source>
), how maven will know
the path java 1.6 as java home points to 1.7?
If I need to compile the source code with java 1.8, do I need to set source and target as 1.8?
But then, how maven will know that jdk 1.8 is in the path?
Do i need to change java_home to point to java 8?