I have upgraded my web application to Java 7 with JAVA_HOME pointing to 1.7. My Maven plugin is reading the Java version from java_home. But I am bit confused after seeing the below setting in pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<fork>true</fork>
<compilerVersion>1.6</compilerVersion>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
If I keep the above settings as it is, will Maven compile the Java code with 1.6 or 1.7? As per my understanding based on this link, the above settings will get preference and the project will be compiled with 1.6 instead of 1.7. Is that correct?
If I give a setting like below and if I have code specific to JDK 1.7, will my code compile now?
<source>1.6</source>
<target>1.7</target>
I am not sure; what do the above settings actually mean?