From 30455e34b2dacb766b8aefeb5ed24d2899e93f70 Mon Sep 17 00:00:00 2001 From: Michael Keppler Date: Mon, 14 Nov 2022 19:45:57 +0100 Subject: [PATCH] ci: upgrade Tycho to 3.0 One of the plugins has been moved from tycho.extras to tycho core, therefore the groupid is different. Also fix the warnings `[WARNING] artifact foo:bar:p2metadata:10.12.3-SNAPSHOT already attached, replace previous instance` by disabling the default metadata generation. Unfortunately this extra step is necessary when creating source features, since the attaching of metadata needs to be delayed then. 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 https://github.com/eclipse-tycho/tycho/issues/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. --- .github/workflows/maven.yml | 8 +++--- .../Maven update check.launch | 3 ++- net.sf.eclipsecs.target/Maven verify.launch | 3 ++- .../net.sf.eclipsecs.target.target | 24 ++++++++++------- .../net.sf.eclipsecs.target.tpd | 27 ++++++++++++------- pom.xml | 4 +-- 6 files changed, 42 insertions(+), 27 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0044b89c2..10d066a86 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -25,11 +25,13 @@ jobs: path: ~/.m2/repository key: maven-cache-${{ hashFiles('**/pom.xml') }} - - name: Set up JDK ${{ matrix.jdk }} + - name: Set up JDKs uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 with: distribution: temurin - java-version: ${{ matrix.jdk }} + java-version: | + 11 + 17 - name: Build with Maven run: ./mvnw --errors --no-transfer-progress install @@ -40,6 +42,6 @@ jobs: - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@e780361cd1fc1b1a170624547b3ffda64787d365 # v2.12.0 # we only want to attach test results one time, not for every matrix combination - if: startsWith(matrix.platform, 'ubuntu') && (matrix.jdk == 17) + if: startsWith(matrix.platform, 'ubuntu') && (matrix.jdk == 11) with: files: '**/target/surefire-reports/*.xml' diff --git a/net.sf.eclipsecs.target/Maven update check.launch b/net.sf.eclipsecs.target/Maven update check.launch index 5eb7722a1..1a0181458 100644 --- a/net.sf.eclipsecs.target/Maven update check.launch +++ b/net.sf.eclipsecs.target/Maven update check.launch @@ -18,7 +18,8 @@ + - + diff --git a/net.sf.eclipsecs.target/Maven verify.launch b/net.sf.eclipsecs.target/Maven verify.launch index ca6e8cff5..57c388461 100644 --- a/net.sf.eclipsecs.target/Maven verify.launch +++ b/net.sf.eclipsecs.target/Maven verify.launch @@ -18,7 +18,8 @@ + - + diff --git a/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target b/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target index 0cffedb5b..ce55823b7 100644 --- a/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target +++ b/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target @@ -1,7 +1,7 @@ - + @@ -16,15 +16,19 @@ - - - - - - - - - + + + + + + + + + + + + + diff --git a/net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd b/net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd index a53047873..b61e86214 100644 --- a/net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd +++ b/net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd @@ -21,16 +21,23 @@ location "https://download.eclipse.org/releases/2021-06/202106161001/" { org.eclipse.ui.trace } -// matching release of JUnit 5 from Eclipse Orbit -location "https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository" { - org.junit.jupiter.api - org.junit.jupiter.engine - org.junit.jupiter.params - org.junit.platform.commons - org.junit.platform.engine - org.junit.platform.launcher - org.junit.platform.runner - org.junit.platform.suite.api +// You must use 2022-06 or newer as Eclipse IDE to run the unit tests. +// With that version Eclipse started consuming many libraries directly from Maven instead of re-bundling them in Eclipse Orbit. +// Unfortunately the JUnit runtime support (the connection between test engine and IDE/Tycho) therefore had a breaking change +// in the JUnit bundle names, therefore old IDEs can't run the tests anymore. +location "https://download.eclipse.org/releases/2022-09/202209141001/" { + junit-jupiter-api + junit-jupiter-engine + junit-jupiter-migrationsupport + junit-jupiter-params + junit-platform-commons + junit-platform-engine + junit-platform-launcher + junit-platform-runner + junit-platform-suite-api + junit-platform-suite-commons + junit-vintage-engine + org.apiguardian.api } // If the following part has errors and no syntax highlighting, then please use Help>About>Installation>Installed Software>Target Platform DSL>Uninstall. diff --git a/pom.xml b/pom.xml index 3db9c3109..8ebf29aed 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ 3.12.1 3.2.5 3.6.3 - 2.7.5 + 3.0.5 2.16.2 @@ -255,7 +255,7 @@ - org.eclipse.tycho.extras + org.eclipse.tycho tycho-buildtimestamp-jgit ${tycho-version}