Confirmed, javac will complain about it, JDT does not. Interesting. Workarounds:

- preprocess sources from ant and substitute @Override -> <empty>
- compile with ejc (Eclipse compiler).

The second worked for me if you compile from ant, for example:

        <property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"/>

        <target name="dist">
                <echo>${eclipse.home}</echo>
                <javac destdir="tmp/classes" source="1.6" target="1.5">
                        <src location="src2" />
                        <compilerarg value="-version" />
                </javac>
        </target>

it's just the javac that is picky about @Override.

D.

On Mon, Feb 8, 2010 at 12:10 PM, Sean <sro...@gmail.com> wrote:
> Yah that's what I thought too but Benson says that doesn't work and not what
> was in the pom.xml file.  But it worked. Until like yesterday. Color me
> confused.
>
> On Feb 8, 2010 9:00 AM, "Dawid Weiss" <dawid.we...@gmail.com> wrote:
>
> I wrote a post about this a while ago. You need to use the 1.6
> compiler, but set the target to 1.5 -- this way you can keep @Override
> annotations, but emit valid 1.5 code anyway. I don't know about Maven
> (javac), but it definitely works in Eclipse (can be set manually via
> project properties).
>
> D.
>
> On Mon, Feb 8, 2010 at 3:51 AM, Benson Margulies <bimargul...@gmail.com>
> wrote: > I thought we were...
>

Reply via email to