Maven: generics are not supported in -source 1.3 

Joined:
08/13/2009
Posts:
172

August 17, 2010 21:57:40    Last update: August 17, 2010 21:57:40
Problem: You are using generics in your source code, but Maven tries to treat the source code as Java 1.3.

Solution: add the following to pom.xml
<build>
	<plugins>
	    <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-compiler-plugin</artifactId>
		<version>2.3.1</version>
		<configuration>
		    <source>1.5</source>
		    <target>1.5</target>
		</configuration>
	    </plugin>
	</plugins>
</build>
Share |
| Comment  | Tags