Bug 441351 - Target platform selects bundle requiring JRE 8 even on JRE 7
Summary: Target platform selects bundle requiring JRE 8 even on JRE 7
Status: CLOSED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 346174 550601 313553
Blocks:
  Show dependency tree
 
Reported: 2014-08-07 09:44 EDT by Mickael Istria CLA
Modified: 2021-04-28 16:51 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2014-08-07 09:44:03 EDT
To reproduce:
* Using Java 7
* Clone eclipse.jdt.core repository
* cd eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler
* mvn clean verify -Pbuild-individual-bundles -DskipTests=false -Dmaven.test.skip=false

Tycho will use org.eclipse.jdt.annotation 2.0.0 in target-platform. org.eclipse.jdt.annotations 2.0.0 has BREE set to JavaSE-1.8, so it cannot work on Java 7. Consequently, the test will fail to start and surefire instance log will report this reason.
Instead, I would have expected Tycho to select org.eclipse.jdt.annotation 1.1.100, which is available in the referenced repositories and compatible with my Java runtime.
Comment 1 Jan Sievers CLA 2014-08-07 09:47:05 EDT
Not sure but this may be because p2 does not take BREE into account as a constraint when resolving.
Comment 2 Mickael Istria CLA 2014-08-07 09:51:01 EDT
(In reply to Jan Sievers from comment #1)
> Not sure but this may be because p2 does not take BREE into account as a
> constraint when resolving.

That's indeed a highly possible reason.
Are you aware of any discussion/bug report on this topic? I just checked and p2 doesn't even add the BREE as a <requires> in its metadata. It would IMO be a good addition.
Comment 3 Mickael Istria CLA 2014-08-07 09:53:19 EDT
Ok, I found that bug 346174 tracks a similar issue at p2 level.
Comment 4 Christoph Laeubrich CLA 2020-06-18 07:31:39 EDT
@Mickael is this still an issue? Should we try to ping the P2 people to finally fix this?
Comment 5 Mickael Istria CLA 2020-06-18 08:21:20 EDT
(In reply to Christoph Laeubrich from comment #4)
> @Mickael is this still an issue?

I didn't face this issue for a while, so I guess we can stop caring.

> Should we try to ping the P2 people to finally fix this?

Pinging people doesn't necessarily help at resolving issues. Providing patches does ;)