Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 574363

Summary: Move jdt.junit* bundles to Java 11
Product: [Eclipse Project] JDT Reporter: Andrey Loskutov <loskutov>
Component: UIAssignee: Andrey Loskutov <loskutov>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jjohnstn, noopur_gupta, sravankumarl
Version: 4.21   
Target Milestone: 4.24 M2   
Hardware: PC   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=574310
https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182392
https://github.com/eclipse-jdt/eclipse.jdt.ui/pull/3
Whiteboard:

Description Andrey Loskutov CLA 2021-06-21 10:39:25 EDT
Following bundles are using Java 8 still, in context of bug 574310 we could consider to move them to Java 11:

org.eclipse.jdt.junit.runtime
org.eclipse.jdt.junit4.runtime
org.eclipse.jdt.junit5.runtime

See bug 574310 comment 4.

See also bug 574362 comment 2 - I wonder if we can compile at least junit and junit4 bundles with --target 7 to allow older testing of older applications?

Note, that junit5 library itself requires Java 8 (old junit needs only Java 5).
Comment 1 Noopur Gupta CLA 2021-06-22 07:30:24 EDT
(In reply to Andrey Loskutov from comment #0)
> See also bug 574362 comment 2 - I wonder if we can compile at least junit
> and junit4 bundles with --target 7 to allow older testing of older
> applications?

You mean --release 7 with BREE as 11? We could do this if we really want to. Based on a recent discussion with the team, if we want to use --release 7, we need to be careful that it doesn't create any other issues. Few things to consider:
- maven/tycho should work well with this
- bug 574229 and related (see also) bugs need to be checked so that there's no other issue while using --release option
- the support for --release 7 may be removed with newer Java versions in future
Comment 2 Eclipse Genie CLA 2021-06-23 10:26:34 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182392
Comment 3 Andrey Loskutov CLA 2021-06-24 00:53:22 EDT
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created:
> https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182392

I'm a not maven/tycho expert, and obviously my naive attempt to change compilation settings is not working as expected.

Therefore I do not plan to continue working on this patch, if anyone knows tycho well enough, please feel free to take over.
Comment 4 Noopur Gupta CLA 2021-08-24 07:02:44 EDT
No work is planned on this currently. We can reopen it for 4.22 if there's a need.
Comment 5 Andrey Loskutov CLA 2022-04-09 05:45:01 EDT
Recreated on github. May be this time it will work, with new tycho version.
Comment 6 Andrey Loskutov CLA 2022-04-09 06:45:49 EDT
(In reply to Andrey Loskutov from comment #5)
> Recreated on github. May be this time it will work, with new tycho version.

OK, I can set release to 8, and that seem to work.
Comment 7 Andrey Loskutov CLA 2022-06-09 14:47:27 EDT
Fixed for 4.25 M1 via https://github.com/eclipse-jdt/eclipse.jdt.ui/pull/3