Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] FW: Tycho compilation fails with added @Override annotation

forwarding to list...

From: Luchesar Cekov [mailto:luchesar.cekov@xxxxxxxxxxxxxxxxxxxxx] 
Sent: Dienstag, 12. Juli 2011 15:48
To: Sievers, Jan
Subject: Re: [tycho-user] Tycho compilation fails with added @Override annotation

Hi  Jan,

This solved the problem. My project was messed up with org.eclipse.tycho and org.sonatype.tycho plugins which I guess doesn't integrate to well.

I solved the problem by adding:

<plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-compiler-plugin</artifactId>
    <version>${tycho-version}</version>
    <configuration>
        <source>1.6</source>
        <target>1.6</target>
        <encoding>UTF-8</encoding>
    </configuration>

instead of:

<plugin>
    <groupId>org.sonatype.tycho</groupId>
    <artifactId>maven-osgi-compiler-plugin</artifactId>
    <version>${tycho-version}</version>
    <configuration>
        <source>1.6</source>
        <target>1.6</target>
        <encoding>UTF-8</encoding>
    </configuration>
      </plugin>

Thanks for the fast response!
Luchesar

On 12/07/11 14:14, Sievers, Jan wrote: 
the attached project fragment is too small to analyse the problem (parent missing).

according to your MANIFEST.MF you require

Bundle-RequiredExecutionEnvironment: J2SE-1.5

if you don't configure anything in the POM, this means you get source level 1.5 for compilation .

You should use 

Bundle-RequiredExecutionEnvironment: JavaSE-1.6

instead. If you want to explicitly configure source/target level in the POM, beware of artifactId changes between  tycho 0.11=>0.12:

http://wiki.eclipse.org/Tycho_Release_Notes/0.12


Regards,
Jan



From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Luchesar Cekov
Sent: Dienstag, 12. Juli 2011 14:35
To: tycho-user@xxxxxxxxxxx
Subject: [tycho-user] Tycho compilation fails with added @Override annotation

Hi guys,

I am trying to convert from pde build to tycho and hit unexpected problem during compilation.

If there is @Override annotation on my methods the compilation will fail with:
"The method start(BundleContext) of type Activator must override a superclass method"

If I simply remove the @Override annotation it compiles fine. I tried adding maven-osgi-compiler-plugin 1.6 source and target but it did not help! What could be the reason?

It is reproducible with the attached small project. This is one of the tycho demo project with simply added annotations to two methods. It fails with the error:

The method start(BundleContext) of type Activator must override a superclass method

The projects is attached?

Any ideas?

Thanks in advance,
Luchesar

-- 

  
Luchesar Cekov
Software Engineer
+44 (0)20 7239 4949
Ontology Systems
www.ontology.com
        
Registered Office: Ontology-Partners Limited, Dalton House, 60 Windsor Avenue, London SW19 2RR, UK
Company Registration No. 5794201
 
 
 

.
begin:vcard
org:Ontology-Partners Limited
adr:60 Windsor Avenue;;Dalton House;London;;SW19 2RR;UK
title:Registered Office:
version:2.1
end:vcard


Back to the top