Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363497 - Tycho can not be adjusted to compile with java 7 compiler.
Summary: Tycho can not be adjusted to compile with java 7 compiler.
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 11:30 EST by Dimitar Donchev CLA
Modified: 2021-04-28 16:55 EDT (History)
2 users (show)

See Also:


Attachments
Sample project demonstrating the issue (8.55 KB, application/zip)
2011-11-10 11:30 EST, Dimitar Donchev CLA
no flags Details
fixed sample project (6.67 KB, application/x-zip-compressed)
2011-11-11 09:42 EST, Jan Sievers CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitar Donchev CLA 2011-11-10 11:30:55 EST
Created attachment 206795 [details]
Sample project demonstrating the issue

Hello,

I'm trying to compile an eclipse plug-in which contains java 7 compliant code.
I've added 
<plugin>
 <groupId>org.sonatype.tycho</groupId>
 <artifactId>maven-osgi-compiler-plugin</artifactId>
 <version>${tycho-version}</version>
 <configuration>
  <source>1.7</source>
  <target>1.7</target>
  <encoding>UTF-8</encoding>
 </configuration>
</plugin>
to the parent pom and 
"Bundle-RequiredExecutionEnvironment: JavaSE-1.7" 
in the manifest of the plug-in.

No matter if I remove one of those configurations or the other - the maven build still results in compilation failures though the project is built in eclipse with no errors.

I've made a sample project demonstrating the issue and attached it in an archive. 

If this could be a hint : 
If I run the build with Tycho version 0.9.0 the following line appear, though in the manifest java environment 1.7 is clearly stated.
"[WARNING] Overriding compiler source level 1.7 from POM with source level 1.6 from MANIFEST.MF"

If we'd like to adopt java 7 in our OSGI development but this issue needs to be solved. Please help!

Best Regards,
Dimitar
Comment 1 Tobias Oberlies CLA 2011-11-11 09:17:46 EST
Can your reproduce the problem with Tycho 0.13.0?

Please also don't change the priority field. This field is something only to be changed only by the project committers (see https://bugs.eclipse.org/bugs/page.cgi?id=fields.html#priority)
Comment 2 Jan Sievers CLA 2011-11-11 09:42:33 EST
Created attachment 206846 [details]
fixed sample project
Comment 3 Jan Sievers CLA 2011-11-11 09:44:48 EST
sample project works with tycho 0.13.0 (and when running maven with JDK 7), see attched.

BTW, no need to explicitly configure compiler source and target level as these are deduced from BREE.