Not recognizing source 1.5 under JDK 1.6
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Yaakov_Chaikin
Posted On:   Wednesday, August 27, 2008 12:12 PM

Hi, I am using Eclipse Ganymede. I am using maven2's eclipse:eclipse plugin to configure the Eclipse environment for me. Everything worked just fine with the following configuration: maven-compiler-plugin 2.0 1.6 1.6 However, when I changed the source and target to be 1.5, while maven compiles everything just fine, Eclipse does something very weird. The eclipse:eclipse plugin seems to be build proper config inside the .settings folder. My Eclipse compliance is set to 1.5 (I am using JDK 1.6). I have an interface and its implementation sitting in the same package. The implementation that gives the problem looks like this (for example): @Override    More>>
			
Hi,

I am using Eclipse Ganymede. I am using maven2's eclipse:eclipse plugin to configure the Eclipse environment for me.

Everything worked just fine with the following configuration:
maven-compiler-plugin
2.0

1.6
1.6


However, when I changed the source and target to be 1.5, while maven compiles everything just fine, Eclipse does something very weird.

The eclipse:eclipse plugin seems to be build proper config inside the .settings folder. My Eclipse compliance is set to 1.5 (I am using JDK 1.6).

I have an interface and its implementation sitting in the same package. The implementation that gives the problem looks like this (for example):
@Override
public String annotationsToInlineTagged(Document document)
{
// TODO Auto-generated method stub
return null;
}

The error that it gives me is this:
"The method annotationsToInlineTagged(Document) of type DefaultAnnotationsConverter must override a superclass method:"

Meanwhile, it certainly does override the interface method. Again, this works just fine in these situations:
1) I execute maven on the command line with source/target=1.5
2) I changed source/target to 1.6 and Eclipse seems to be happy then.

What doesn't work is if I keep source/target at 1.5 and try to use Eclipse, it complains with error I pasted above.

Does anyone know what the problem is and how to fix it? Is this an Eclipse bug?

   <<Less
About | Sitemap | Contact