MyEclipse Maven Error: Generics are not supported in -source 1.3
Problem: I got this error:
C:\WorkspaceMyEclipse\HRTrainingPersistence\src\main\java\gov\faa\amc\nas\hrtraining\persistence\TrainingClass.java:[45,2] annotations are not supported in -source 1.3</pre> (use -source 5 or higher to enable annotations) @Override <pre>
Solution: Maven’s default java complier is 1.3 (very weird). I had to add a plugin tag for Java 1.5, right after <dependencies> tag.
<build> <!-- For annotations and other Java5 stuff --> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build>
References: Maven Documentation Home
Q: How to setup Maven JDK Home?

Reference: How to fix Maven ‘Add JDK’ warning?
1 Comment »
Leave a comment
-
Archives
- November 2009 (1)
- July 2009 (1)
- June 2009 (5)
- May 2009 (2)
- April 2009 (4)
- March 2009 (2)
- January 2009 (3)
- December 2008 (1)
- November 2008 (2)
- October 2008 (1)
- September 2008 (3)
- August 2008 (2)
-
Categories
-
RSS
Entries RSS
Comments RSS
[...] Hobione’s Blog entry on the same [...]