Skip to content

Commit 80cecab

Browse files
committed
Build with Java-21 and maven 3.9.6
Configure the Tycho-surefire and tycho-compiler plug-ins to still use a Java-17 JDK to run tests respectively build m2e projects.
1 parent d368f6a commit 80cecab

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.github/workflows/maven.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626
submodules: true
2727
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
2828
with:
29-
java-version: '17'
29+
java-version: |
30+
17
31+
21
3032
distribution: 'temurin'
3133
- name: Set up Maven
3234
uses: stCarolas/setup-maven@v5

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pipeline {
99
label "centos-latest"
1010
}
1111
tools {
12-
maven 'apache-maven-3.9.5'
13-
jdk 'openjdk-jdk17-latest'
12+
maven 'apache-maven-3.9.6'
13+
jdk 'openjdk-jdk21-latest'
1414
}
1515
stages {
1616
stage('get m2e-core-tests') {

pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<surefire.timeout>900</surefire.timeout>
3232
<tycho.surefire.useUIHarness>true</tycho.surefire.useUIHarness>
3333
<tycho.surefire.useUIThread>true</tycho.surefire.useUIThread>
34+
<tycho.useJDK>SYSTEM</tycho.useJDK>
3435
<jacoco.destFile>../target/jacoco.exec</jacoco.destFile>
3536
<tycho.scmUrl>scm:git:https://github.com/eclipse-m2e/m2e-core.git</tycho.scmUrl>
3637
<trimStackTrace>false</trimStackTrace>
@@ -192,6 +193,9 @@
192193
<groupId>org.eclipse.tycho</groupId>
193194
<artifactId>tycho-compiler-plugin</artifactId>
194195
<version>${tycho-version}</version>
196+
<configuration>
197+
<useJDK>${tycho.useJDK}</useJDK>
198+
</configuration>
195199
</plugin>
196200
<plugin>
197201
<groupId>org.eclipse.tycho</groupId>
@@ -203,6 +207,14 @@
203207
<artifactId>tycho-p2-repository-plugin</artifactId>
204208
<version>${tycho-version}</version>
205209
</plugin>
210+
<plugin>
211+
<groupId>org.eclipse.tycho</groupId>
212+
<artifactId>tycho-surefire-plugin</artifactId>
213+
<version>${tycho-version}</version>
214+
<configuration>
215+
<useJDK>${tycho.useJDK}</useJDK>
216+
</configuration>
217+
</plugin>
206218
</plugins>
207219
</pluginManagement>
208220
</build>
@@ -225,7 +237,6 @@
225237
<plugin>
226238
<groupId>org.eclipse.tycho</groupId>
227239
<artifactId>tycho-surefire-plugin</artifactId>
228-
<version>${tycho-version}</version>
229240
<configuration>
230241
<dependencies combine.children="append">
231242
<!--this dependency is needed to detect and set the default VM correctly on Mac OS,

target-platform/target-platform.target

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde version="3.8"?>
33
<target name="m2e-target-platform">
4-
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
4+
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
55
<locations>
66
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
77
<repository location="https://download.eclipse.org/eclipse/updates/4.31/"/>

0 commit comments

Comments
 (0)