Skip to content

Commit 2ff5804

Browse files
joaodinissfclaude
andcommitted
feat: upgrade to JUnit 6 + Eclipse 4.39 (simrel 2026-03) — milestone Xtext
End-to-end JUnit 6 + Eclipse 4.39 upgrade. Verified locally: 357 tests, 0 failures, 0 errors. The OSGi runtime contains only JUnit 6.0.3 bundles (no JUnit 5.14.x, no jdt.junit5.runtime). Two layers of dual-version JUnit pollution had to be peeled back: 1. Eclipse PDE umbrella feature transitively pulls jdt.junit5.runtime (strict-pinned to JUnit 5.14.x). Workaround: replace org.eclipse.pde.feature.group in the target with a curated bundle list of the six PDE bundles DDK uses (pde.core, pde.ui, pde.ua.core, pde.junit.runtime, jdt.junit.runtime, jdt.annotation). Verified load-bearing: dropping the curated list and going back to pde.feature.group makes target resolution unsatisfiable. 2. Xtext 2.42.0's org.eclipse.xtext.testing hard-pins org.junit.jupiter.api [5.1.0,6.0.0). Fix: eclipse-xtext/xtext#3660 "Junit 6 support" landed in Xtext 2.43.0. This branch points at the 2.43.0.M2 milestone; a one-line follow-up PR will flip the URL to releases/2.43.0/ once stable ships on 2026-05-25. Branch convention exception: this PR uses an Xtext milestone URL rather than a stable release. The standing project rule is stable-only. The exception is narrow: blocker fully understood, upstream fix confirmed in M2, stable date on the horizon, and a follow-up PR is planned to swap to stable. Other target file changes: - sequenceNumber 28 -> 29 - Eclipse SDK location updates/4.34/ -> releases/2026-03/ - Source-feature IUs (platform.source.feature.group, jdt.source.*, pde.source.*) dropped — renamed in modern simrels and not needed for headless Tycho test runs. - swtbot.junit5.feature.group dropped — its feature.xml requires the JUnit 4 'org.junit' bundle which is no longer in the target, and DDK doesn't use SWTBotJunit5Extension (verified via static analysis). - orbit-aggregation 4.37.0 -> 4.39.0 with JUnit 6.0.3 IUs and dep versions back to 4.39-era (mockito 5.21.0, byte-buddy 1.18.5, objenesis 3.5.0, commons-lang3 3.20.0, commons-text 1.15.0, log4j 2.25.3). xtext.test/pom.xml: - <providerHint>junit5</providerHint> -> <providerHint>junit6</providerHint> - extraRequirements: replaced the org.eclipse.pde feature requirement with an explicit org.eclipse.pde.junit.runtime plugin requirement Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 950b810 commit 2ff5804

2 files changed

Lines changed: 46 additions & 25 deletions

File tree

com.avaloq.tools.ddk.xtext.test/pom.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<configuration>
2020
<trimStackTrace>false</trimStackTrace>
2121
<skip>false</skip>
22+
<providerHint>junit6</providerHint>
2223
<testClass>${test.testClass}</testClass>
2324
<failIfNoTests>false</failIfNoTests>
2425
<useUIThread>false</useUIThread>
@@ -48,9 +49,15 @@
4849
<id>org.eclipse.xtext.sdk</id>
4950
<versionRange>0.0.0</versionRange>
5051
</requirement>
52+
<!--
53+
org.eclipse.pde feature group is replaced in ddk-target/ddk.target by an
54+
explicit list of pde.core / pde.ui / pde.ua.core / pde.junit.runtime so we
55+
avoid pulling jdt.junit5.runtime (which strict-pins JUnit 5.14.x and conflicts
56+
with our JUnit 6 stack).
57+
-->
5158
<requirement>
52-
<type>eclipse-feature</type>
53-
<id>org.eclipse.pde</id>
59+
<type>eclipse-plugin</type>
60+
<id>org.eclipse.pde.junit.runtime</id>
5461
<versionRange>0.0.0</versionRange>
5562
</requirement>
5663
<requirement>

ddk-target/ddk.target

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde version="3.8"?>
3-
<target name="DDK Target" sequenceNumber="28">
3+
<target name="DDK Target" sequenceNumber="29">
44
<locations>
55
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
66
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="0.0.0"/>
77
<unit id="org.eclipse.swtbot.feature.group" version="0.0.0"/>
88
<unit id="org.eclipse.swtbot.ide.feature.group" version="0.0.0"/>
9-
<unit id="org.eclipse.swtbot.junit5.feature.group" version="0.0.0"/>
109
<repository location="http://download.eclipse.org/technology/swtbot/releases/4.2.1/"/>
1110
</location>
1211
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
13-
<unit id="org.eclipse.pde.source.feature.group" version="0.0.0"/>
14-
<unit id="org.eclipse.jdt.source.feature.group" version="0.0.0"/>
12+
<!-- Curated bundle list instead of org.eclipse.pde.feature.group: that aggregator pulls
13+
BOTH org.eclipse.jdt.junit5.runtime (which strict-pins JUnit 5.14.x) AND
14+
org.eclipse.jdt.junit6.runtime (JUnit 6.x), producing the dual-version pollution
15+
that crashed test discovery in PR #1292's silent-zero. The bundles below are the
16+
minimum DDK actually uses (verified via static analysis of all MANIFEST.MFs and
17+
src/ Java/Xtend imports); pde.junit.runtime + jdt.junit.runtime supply the OSGi-side
18+
test launcher and depend only on the version-agnostic jdt.junit.runtime base. -->
1519
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
16-
<unit id="org.eclipse.platform.source.feature.group" version="0.0.0"/>
17-
<repository location="https://download.eclipse.org/eclipse/updates/4.34/"/>
20+
<unit id="org.eclipse.pde.core" version="0.0.0"/>
21+
<unit id="org.eclipse.pde.ui" version="0.0.0"/>
22+
<unit id="org.eclipse.pde.ua.core" version="0.0.0"/>
23+
<unit id="org.eclipse.pde.junit.runtime" version="0.0.0"/>
24+
<unit id="org.eclipse.jdt.junit.runtime" version="0.0.0"/>
25+
<unit id="org.eclipse.jdt.annotation" version="0.0.0"/>
26+
<repository location="https://download.eclipse.org/releases/2026-03/"/>
1827
</location>
1928
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
2029
<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
@@ -35,32 +44,37 @@
3544
<unit id="org.eclipse.xtend.sdk.feature.group" version="0.0.0"/>
3645
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
3746
<unit id="org.eclipse.xtext.xtext.generator" version="0.0.0"/>
38-
<repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.42.0/"/>
47+
<!-- TEMPORARY: Xtext 2.43.0.M2 milestone (stable 2.43.0 due 2026-05-25). 2.43.0 is the
48+
first Xtext release with JUnit 6 support (issue eclipse-xtext/xtext#3660). The 2.42.0
49+
release (2026-02) hard-pins org.junit.jupiter.api [5.1.0,6.0.0), which is the upstream
50+
blocker we hit during step 4 iterations. Switch back to a stable release URL once
51+
2.43.0 stable is available. -->
52+
<repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/milestones/2.43.0.M2/"/>
3953
</location>
4054
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
4155
<repository location="https://download.eclipse.org/lsp4j/updates/releases/1.0.0/"/>
4256
<unit id="org.eclipse.lsp4j.sdk.feature.group" version="0.0.0"/>
4357
</location>
4458
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
45-
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.37.0"/>
46-
<unit id="net.bytebuddy.byte-buddy" version="1.17.7"/>
47-
<unit id="org.objenesis" version="3.4.0"/>
48-
<unit id="org.mockito.mockito-core" version="5.19.0"/>
59+
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.39.0"/>
60+
<unit id="net.bytebuddy.byte-buddy" version="1.18.5"/>
61+
<unit id="org.objenesis" version="3.5.0"/>
62+
<unit id="org.mockito.mockito-core" version="5.21.0"/>
4963
<unit id="org.hamcrest" version="2.2.0"/>
5064
<unit id="org.apache.commons.logging" version="1.2.0"/>
51-
<unit id="org.apache.commons.text" version="1.14.0"/>
52-
<unit id="org.apache.commons.lang3" version="3.18.0"/>
53-
<unit id="org.apache.logging.log4j.core" version="2.25.1"/>
54-
<unit id="org.apache.logging.log4j.api" version="2.25.1"/>
65+
<unit id="org.apache.commons.text" version="1.15.0"/>
66+
<unit id="org.apache.commons.lang3" version="3.20.0"/>
67+
<unit id="org.apache.logging.log4j.core" version="2.25.3"/>
68+
<unit id="org.apache.logging.log4j.api" version="2.25.3"/>
5569
<unit id="org.apache.log4j" version="1.2.26"/> <!--use reload4j 1.2.26 for org.eclipse.xtext dependencies to log4j-->
56-
<unit id="junit-jupiter-api" version="5.13.4"/>
57-
<unit id="junit-jupiter-engine" version="5.13.4"/>
58-
<unit id="junit-jupiter-params" version="5.13.4"/>
59-
<unit id="junit-platform-commons" version="1.13.4"/>
60-
<unit id="junit-platform-engine" version="1.13.4"/>
61-
<unit id="junit-platform-launcher" version="1.13.4"/>
62-
<unit id="junit-platform-suite-api" version="1.13.4"/>
63-
<unit id="junit-platform-suite-engine" version="1.13.4"/>
70+
<unit id="junit-jupiter-api" version="6.0.3"/>
71+
<unit id="junit-jupiter-engine" version="6.0.3"/>
72+
<unit id="junit-jupiter-params" version="6.0.3"/>
73+
<unit id="junit-platform-commons" version="6.0.3"/>
74+
<unit id="junit-platform-engine" version="6.0.3"/>
75+
<unit id="junit-platform-launcher" version="6.0.3"/>
76+
<unit id="junit-platform-suite-api" version="6.0.3"/>
77+
<unit id="junit-platform-suite-engine" version="6.0.3"/>
6478
</location>
6579
</locations>
6680
</target>

0 commit comments

Comments
 (0)