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

2011-09-29T21:21:42

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 ??

Copyright License:
Author:「Sonam Farzana」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/7597950/maven-error-generics-are-not-supported-in-source-1-3-i-am-using-1-6

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

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
I'm using maven in my projects and my classes does not have any error but when i use mvn compile &amp; package it gives me a various error as below: [ERROR] Failed to execute goal org.apache.maven.
I have a problem while maven packaging. In this code: public class LoginDialog extends Dialog { private final TextField&lt;String&gt; customer; ^here private final
I have a problem while maven packaging. In this code: public class LoginDialog extends Dialog { private final TextField&lt;String&gt; customer; ^here private final
I am using Maven 2.x, Atlassian Bamboo with maven plugin my build jdk configuration is set to 1.6 and i don't have any jdk version enforced setting in pom.xml file. When i compile project in my ID...
I'm using embedded jetty server to build a war, I ran maven clean through eclipse, then maven install. I get a bunch of "not supported" errors \RoleDao.java:[86,13] generics are not supported in -...
When building my projects using Maven from Netbeans 6.7, I get these error messages: Error annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations) I've al...
I had created a Restful web service simple project using the Eclipse. When I try to compile it, I'm getting the following error. Not sure why the annotations are not supported, I did the same usin...
I am using JRE 1.5. Still when I try to compile my code it fails by saying to use JRE 1.5 instead of 1.3 C:\temp\SpringExample>mvn -e clean install + Error stacktraces are turned on. [INFO] Scann...
im getting below message when run mvn clean install [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure D:\data\work\ex...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.