How to configure maven to update jdk source and target version

This page lists down quick steps to update jdk source and target using maven. By default, Maven uses JDK 1.5, Lets reconfigure it to use 1.6.

POM.XML
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.1</version>
      <configuration>
        <source>1.6</source>
        <target>1.6</target>
      </configuration>
    </plugin>
  </plugins>
</build>

Version History


Date Description
2014-02-16    Initial Version