星期日, 9月 01, 2013

How to fixed "error: generics are not supported in -source 1.3" problem

If you find this problem when use Maven compile



error: generics are not supported in -source 1.3


solution

add following plugin to your pom.xml

<project>
  [...]
  <build>
    [...]
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.0</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
    [...]
  </build>
  [...]
</project>

沒有留言: