Skip to content

Commit 11a4a81

Browse files
committed
ci: upgrade Tycho to 4.0.5
That is the most recent version of Tycho. It requires Java 17 for running, but can compile Java 11 code. One of the plugins has been moved from tycho.extras to tycho core, therefore the groupid is different. Some new tycho plugins have been added. Even though we don't use them, they need to be configured due to our strict enforcer checks. There are new warnings at the very end of the build like `No digest algorithm is available to verify download`. That's an open issue in Tycho but it doesn't break the build, see eclipse-tycho/tycho#1482 Finally the target platform also needs to be updated. Tycho 3.0 resolves the JUnit classpath container of the .classpath files against the bundle names introduced in Eclipse 2022-06. Most thirdparty libraries have been changed from repackaging in Eclipse Orbit to "consume as is" from Maven. This does not affect the EclipseCS plugin created by the build, since the new JUnit bundles are only needed at IDE or build time. The jgit exception at the end of a Maven build can be ignored. It's fixed already upstream, but will probably only be available for use in Tycho with the Eclipse 2024-03 release.
1 parent 0c15cec commit 11a4a81

File tree

6 files changed

+48
-32
lines changed

6 files changed

+48
-32
lines changed

.github/workflows/maven.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ jobs:
2525
path: ~/.m2/repository
2626
key: maven-cache-${{ hashFiles('**/pom.xml') }}
2727

28-
- name: Set up JDK ${{ matrix.jdk }}
28+
- name: Set up JDKs
2929
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
3030
with:
3131
distribution: temurin
32-
java-version: ${{ matrix.jdk }}
32+
java-version: |
33+
11
34+
17
3335
3436
- name: Build with Maven
3537
run: ./mvnw --errors --no-transfer-progress install
@@ -40,6 +42,6 @@ jobs:
4042
- name: Publish Test Results
4143
uses: EnricoMi/publish-unit-test-result-action@8885e273a4343cd7b48eaa72428dea0c3067ea98 # v2.14.0
4244
# we only want to attach test results one time, not for every matrix combination
43-
if: startsWith(matrix.platform, 'ubuntu') && (matrix.jdk == 17)
45+
if: startsWith(matrix.platform, 'ubuntu') && (matrix.jdk == 11)
4446
with:
4547
files: '**/target/surefire-reports/*.xml'

net.sf.eclipsecs.target/Maven update check.launch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
1919
</listAttribute>
2020
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
21+
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
2122
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
22-
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
23+
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
2324
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${git_work_tree:/eclipse-cs}"/>
2425
</launchConfiguration>

net.sf.eclipsecs.target/Maven verify.launch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
1919
</listAttribute>
2020
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
21+
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
2122
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
22-
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
23+
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
2324
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${git_work_tree:/eclipse-cs}"/>
2425
</launchConfiguration>

net.sf.eclipsecs.target/net.sf.eclipsecs.target.target

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
33
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4-
<target name="Eclipse Checkstyle" sequenceNumber="1706381587">
4+
<target name="Eclipse Checkstyle" sequenceNumber="1707931034">
55
<locations>
66
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
77
<unit id="org.eclipse.jdt.feature.group" version="3.18.800.v20210611-1600"/>
@@ -16,15 +16,19 @@
1616
<repository location="https://download.eclipse.org/releases/2021-06/202106161001/"/>
1717
</location>
1818
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
19-
<unit id="org.junit.jupiter.api" version="5.7.1.v20210222-1948"/>
20-
<unit id="org.junit.jupiter.engine" version="5.7.1.v20210222-1948"/>
21-
<unit id="org.junit.jupiter.params" version="5.7.1.v20210222-1948"/>
22-
<unit id="org.junit.platform.commons" version="1.7.1.v20210222-1948"/>
23-
<unit id="org.junit.platform.engine" version="1.7.1.v20210222-1948"/>
24-
<unit id="org.junit.platform.launcher" version="1.7.1.v20210222-1948"/>
25-
<unit id="org.junit.platform.runner" version="1.7.1.v20210222-1948"/>
26-
<unit id="org.junit.platform.suite.api" version="1.7.1.v20210222-1948"/>
27-
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
19+
<unit id="junit-jupiter-api" version="5.9.0"/>
20+
<unit id="junit-jupiter-engine" version="5.9.0"/>
21+
<unit id="junit-jupiter-migrationsupport" version="5.9.0"/>
22+
<unit id="junit-jupiter-params" version="5.9.0"/>
23+
<unit id="junit-platform-commons" version="1.9.0"/>
24+
<unit id="junit-platform-engine" version="1.9.0"/>
25+
<unit id="junit-platform-launcher" version="1.9.0"/>
26+
<unit id="junit-platform-runner" version="1.9.0"/>
27+
<unit id="junit-platform-suite-api" version="1.9.0"/>
28+
<unit id="junit-platform-suite-commons" version="1.9.0"/>
29+
<unit id="junit-vintage-engine" version="5.9.0"/>
30+
<unit id="org.apiguardian.api" version="1.1.2"/>
31+
<repository location="https://download.eclipse.org/releases/2022-09/202209141001/"/>
2832
</location>
2933
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven" label="SnakeYaml">
3034
<dependencies>

net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@ location "https://download.eclipse.org/releases/2021-06/202106161001/" {
2121
org.eclipse.ui.trace
2222
}
2323

24-
// matching release of JUnit 5 from Eclipse Orbit
25-
location "https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository" {
26-
org.junit.jupiter.api
27-
org.junit.jupiter.engine
28-
org.junit.jupiter.params
29-
org.junit.platform.commons
30-
org.junit.platform.engine
31-
org.junit.platform.launcher
32-
org.junit.platform.runner
33-
org.junit.platform.suite.api
24+
// You must use 2022-06 or newer as Eclipse IDE to run the unit tests.
25+
// With that version Eclipse started consuming many libraries directly from Maven instead of re-bundling them in Eclipse Orbit.
26+
// Unfortunately the JUnit runtime support (the connection between test engine and IDE/Tycho) therefore had a breaking change
27+
// in the JUnit bundle names, therefore old IDEs can't run the tests anymore.
28+
location "https://download.eclipse.org/releases/2022-09/202209141001/" {
29+
junit-jupiter-api
30+
junit-jupiter-engine
31+
junit-jupiter-migrationsupport
32+
junit-jupiter-params
33+
junit-platform-commons
34+
junit-platform-engine
35+
junit-platform-launcher
36+
junit-platform-runner
37+
junit-platform-suite-api
38+
junit-platform-suite-commons
39+
junit-vintage-engine
40+
org.apiguardian.api
3441
}
3542

3643
// If the following part has errors and no syntax highlighting, then please use Help>About>Installation>Installed Software>Target Platform DSL>Uninstall.

pom.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<maven-site-plugin-version>3.12.1</maven-site-plugin-version>
3737
<maven-surefire-plugin-version>3.2.5</maven-surefire-plugin-version>
3838
<maven-version>3.6.3</maven-version>
39-
<tycho-version>2.7.5</tycho-version>
39+
<tycho-version>4.0.5</tycho-version>
4040
<versions-maven-plugin-version>2.16.2</versions-maven-plugin-version>
4141

4242
<!-- sevntu and patch-filters need to use a compatible/compiled version with checkstyle -->
@@ -49,6 +49,7 @@
4949

5050
<!-- ignore all versions with non numerical parts during versions:display-plugin-updates -->
5151
<maven.version.ignore>.*[a-zA-Z]+.*</maven.version.ignore>
52+
<maven.compiler.release>11</maven.compiler.release>
5253
</properties>
5354

5455
<scm>
@@ -117,7 +118,6 @@
117118
see https://github.com/eclipse-tycho/tycho/issues/1660 -->
118119
<file>${maven.multiModuleProjectDirectory}/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target</file>
119120
</target>
120-
<resolver>p2</resolver>
121121
<environments>
122122
<environment>
123123
<os>win32</os>
@@ -216,6 +216,11 @@
216216
<artifactId>download-maven-plugin</artifactId>
217217
<version>${download-maven-plugin-version}</version>
218218
</plugin>
219+
<plugin>
220+
<groupId>org.eclipse.tycho</groupId>
221+
<artifactId>tycho-bnd-plugin</artifactId>
222+
<version>${tycho-version}</version>
223+
</plugin>
219224
<plugin>
220225
<groupId>org.eclipse.tycho</groupId>
221226
<artifactId>tycho-compiler-plugin</artifactId>
@@ -255,7 +260,7 @@
255260
<dependencies>
256261
<!-- generate timestamps from last git change of any file in this module -->
257262
<dependency>
258-
<groupId>org.eclipse.tycho.extras</groupId>
263+
<groupId>org.eclipse.tycho</groupId>
259264
<artifactId>tycho-buildtimestamp-jgit</artifactId>
260265
<version>${tycho-version}</version>
261266
</dependency>
@@ -371,10 +376,6 @@
371376
</goals>
372377
</execution>
373378
</executions>
374-
<configuration>
375-
<source>11</source>
376-
<target>11</target>
377-
</configuration>
378379
</plugin>
379380
<plugin>
380381
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)