Skip to content

Commit

Permalink
ci: upgrade Tycho to 3.0
Browse files Browse the repository at this point in the history
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
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.
  • Loading branch information
Bananeweizen committed Jan 27, 2024
1 parent d9bd735 commit 30455e3
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 27 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
3 changes: 2 additions & 1 deletion net.sf.eclipsecs.target/Maven update check.launch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<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/"/>
<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/"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${git_work_tree:/eclipse-cs}"/>
</launchConfiguration>
3 changes: 2 additions & 1 deletion net.sf.eclipsecs.target/Maven verify.launch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<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/"/>
<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/"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${git_work_tree:/eclipse-cs}"/>
</launchConfiguration>
24 changes: 14 additions & 10 deletions net.sf.eclipsecs.target/net.sf.eclipsecs.target.target
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="Eclipse Checkstyle" sequenceNumber="1695470918">
<target name="Eclipse Checkstyle" sequenceNumber="1703064646">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.feature.group" version="3.18.800.v20210611-1600"/>
Expand All @@ -16,15 +16,19 @@
<repository location="https://download.eclipse.org/releases/2021-06/202106161001/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.junit.jupiter.api" version="5.7.1.v20210222-1948"/>
<unit id="org.junit.jupiter.engine" version="5.7.1.v20210222-1948"/>
<unit id="org.junit.jupiter.params" version="5.7.1.v20210222-1948"/>
<unit id="org.junit.platform.commons" version="1.7.1.v20210222-1948"/>
<unit id="org.junit.platform.engine" version="1.7.1.v20210222-1948"/>
<unit id="org.junit.platform.launcher" version="1.7.1.v20210222-1948"/>
<unit id="org.junit.platform.runner" version="1.7.1.v20210222-1948"/>
<unit id="org.junit.platform.suite.api" version="1.7.1.v20210222-1948"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
<unit id="junit-jupiter-api" version="5.9.0"/>
<unit id="junit-jupiter-engine" version="5.9.0"/>
<unit id="junit-jupiter-migrationsupport" version="5.9.0"/>
<unit id="junit-jupiter-params" version="5.9.0"/>
<unit id="junit-platform-commons" version="1.9.0"/>
<unit id="junit-platform-engine" version="1.9.0"/>
<unit id="junit-platform-launcher" version="1.9.0"/>
<unit id="junit-platform-runner" version="1.9.0"/>
<unit id="junit-platform-suite-api" version="1.9.0"/>
<unit id="junit-platform-suite-commons" version="1.9.0"/>
<unit id="junit-vintage-engine" version="5.9.0"/>
<unit id="org.apiguardian.api" version="1.1.2"/>
<repository location="https://download.eclipse.org/releases/2022-09/202209141001/"/>
</location>
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven" label="SnakeYaml">
<dependencies>
Expand Down
27 changes: 17 additions & 10 deletions net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<maven-site-plugin-version>3.12.1</maven-site-plugin-version>
<maven-surefire-plugin-version>3.2.5</maven-surefire-plugin-version>
<maven-version>3.6.3</maven-version>
<tycho-version>2.7.5</tycho-version>
<tycho-version>3.0.5</tycho-version>
<versions-maven-plugin-version>2.16.2</versions-maven-plugin-version>

<!-- sevntu and patch-filters need to use a compatible/compiled version with checkstyle -->
Expand Down Expand Up @@ -255,7 +255,7 @@
<dependencies>
<!-- generate timestamps from last git change of any file in this module -->
<dependency>
<groupId>org.eclipse.tycho.extras</groupId>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-buildtimestamp-jgit</artifactId>
<version>${tycho-version}</version>
</dependency>
Expand Down

0 comments on commit 30455e3

Please sign in to comment.