Alex Rivera | Logout

Maven : error: generics are not supported in -source 1.3 , I am using 1.6

Asked 2011-09-29T13:21:42.877
31

I have imported an existing Maven project into Eclipse IDE . I have modified some code in it , it compiled successfully , I am using Java 1.6 as compiler and when i am trying to run maven clean install -X

Its giving the following error

could not parse error message: (use -source 5 or higher to enable generics) D:\bayer\util\src\main\java\com\tata\bayer\util\BrokerageCalendar.java:179: error: generics are not supported in -source 1.3

   private static Hashtable<String, Boolean> nyseHolidays = new Hashtable<String, Boolean>();
                           ^

could not parse error message:   (use -source 5 or higher to enable generics)
D:\bayer\util\src\main\java\com\tata\bayer\util\APIHttpXmlClient.java:27: error: generics are not supported in -source 1.3
                        Class<? extends APIResponse> responseClass) {
                         ^

Please suggest any ideas as how to resolve this ??

Edit
Report

1 Answer

5

You have to configure the Maven Compiler Plugin.

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>2.3</version>
  <configuration>
    <source>1.6</source>
    <target>1.6</target>
  </configuration>
</plugin>
answered 2011-09-29T13:24:20.143

Your Answer