Skip to content

Update the build to Java 21, Tycho 5 and Eclipse 4.41, and fix the CI tests - #125

Open
opravil-jan wants to merge 12 commits into
apache:masterfrom
opravil-jan:build/update-dependencies
Open

opravil-jan wants to merge 12 commits into
apache:masterfrom
opravil-jan:build/update-dependencies

Conversation

@opravil-jan

Copy link
Copy Markdown

Summary

This PR consolidates the open dependency and build PRs into one change and brings the whole build up to date: Java 21, Tycho 5.0.4, Eclipse 4.41, and current releases of the libraries the product ships. It also makes the SWTBot UI tests pass again and runs them in every GitHub Actions build.

It replaces these PRs, or deliberately leaves them out:

PR Status in this PR
#60 LDAP API 2.1.6 Left out: LDAP API 2.1.1+ needs MINA 2.2, which breaks ApacheDS AM26 (see below)
#74, #90 Tycho 3.0.5 / 4.0.8 Superseded: Tycho 5.0.4
#79 ApacheDS 2.0.0.AM27 Left out, see "ApacheDS, LDAP API and MINA" below
#83 createDMG.sh multi-platform Left out: a macOS packaging feature, not a dependency update
#86, #94, #99, #100 GitHub Actions Superseded: checkout v7.0.1, setup-java v6.3.0, upload-artifact v7.0.2, codeql-action v4.39.5, scorecard-action v2.6.0
#89 exec-maven-plugin 3.3.0 Superseded: 3.7.0, now managed in the root POM
#96 junit-platform-runner 1.10.3 Superseded: JUnit Jupiter 5.14.4 / Platform 1.14.4
#98 POI 5.3.0 Superseded: POI 6.0.0. #98 only changed one POM; the embedded jar names in Bundle-ClassPath and the POI 5+ dependencies (commons-math3, SparseBitSet, log4j-api) were missing
#114 Java 25 ANTLR build Superseded: same idea, implemented differently (see below)

Changes

Java, Tycho, Eclipse

  • Java 21 baseline (maven.compiler.release 21, -Dosgi.requiredJavaVersion=21). Eclipse 4.41 requires Java 21.
  • Tycho 2.3.0 → 5.0.4. Tycho 5 needs Maven 3.9.9 or newer.
  • Target platform: Eclipse 4.41 (R-4.41-202608281142), SWTBot 4.3.0, Orbit 4.41, Babel R0.20.0 (2022-12, the latest Babel release).
  • Removed things Eclipse 4.41 no longer ships: javax.xml, javax.xml.stream, org.eclipse.jdt.launching.macosx, org.eclipse.osgi.services, the source features, the EMF/ECF features in the product (their bundles still come in as dependencies) and the Babel fragments that no longer exist.
  • API removals: IPageLayout.ID_RES_NAV → ID_PROJECT_EXPLORER; setShowFastViewBars removed.
  • pom-first.xml of the target platform uses pom packaging, because Tycho 5 otherwise resolves the .target before the local p2 repository it refers to exists. The generated .target is attached with build-helper, so it is still installed for single-module builds.

Maven Wrapper

./mvnw / mvnw.cmd pin Maven 3.9.16 (with a SHA-256 checksum) for CI, Jenkins, build.sh/build.bat and the README:

  • The Jenkins build image (see "Jenkins test lab") contains no Maven, and apachedirectory/maven-build images ship Maven 3.9.6 or older, which is too old for Tycho 5.
  • GitHub's Ubuntu runners ship Maven 3.10.1. Maven 3.10.x (Resolver 2.0) fails with Tycho 5.0.4 (Invalid Collect Request: null while resolving the bundles' dependencies), so the wrapper stays on the latest 3.9.x.

ANTLR on Java 18+ (#114)

The antlr-maven-plugin traps System.exit() with a SecurityManager, which Java 18+ no longer allows, so master does not build on Java 21. The parser is now generated by exec-maven-plugin (exec goal) running antlr.Tool in a forked JVM, and build-helper adds the generated sources in pom-first.xml. Unlike #114, generated sources are not committed and no mainClass is needed.

Libraries

  • Commons: codec 1.23.0, collections4 4.6.0, io 2.22.0, lang3 3.22.0, pool 2.13.1, text 1.15.0. Bundle symbolic names changed for commons-io and commons-text; features and Require-Bundle were updated.
  • httpclient 4.5.14 / httpcore 4.4.16, BouncyCastle 1.62 → 1.87 (jdk15on → jdk18on, plus bcutil).
  • MINA 2.1.10 → 2.1.15 (latest 2.1.x; see "ApacheDS, LDAP API and MINA" for why not 2.2).
  • dom4j: the Orbit org.dom4j 2.2.0 bundle replaces the ServiceMix bundle, whose javax.xml.stream [1.0,2) import no longer resolves cleanly on Eclipse 4.41. It is mirrored into the dependencies update site, so installing Studio into an Eclipse IDE still works.
  • slf4j-api 1.7.36 is published locally because the Eclipse platform ships slf4j 2.x. slf4j-nop is only used to resolve the target platform: it lives in a separate local repository and is not published in the update site. The bundles that import org.slf4j now use the range [1.7,1.8), so they wire to the same slf4j as the LDAP API and log through slf4j-eclipselog.
  • The ServiceMix ANTLR bundle is now an explicit dependency, because the OpenLDAP ACL editor uses it directly.
  • Export: POI 3.9 → 6.0.0 (ExportXlsRunnable uses CellType; commons-math3, SparseBitSet and log4j-api are embedded next to it), xerces 2.11.0 → 2.12.2.
  • Docs: FOP 2.12, xalan 2.7.3 (+ the serializer artifact, split out in 2.7.3), ant-apache-regexp 1.10.18.
  • Parent POM 48 → 52, skin 1.0.3.
  • Tests: JUnit 5.14.4 (Tycho 5 does not support JUnit 6 yet), hamcrest 3.0.0, opentest4j 1.3.0.

Versions that are held back on purpose:

  • LDAP API stays on 2.1.0 and MINA on 2.1.x (see below).
  • slf4j stays on 1.7.36, because the LDAP API imports org.slf4j [1.7,1.8).
  • Caffeine stays on 2.9.3, because ApacheDS AM26 imports com.github.benmanes.caffeine.cache [2.7,3).
  • commons-logging stays on 1.2, because httpclient 4.5 imports [1.1,1.3).
  • odftoolkit stays on 0.8.8 / 0.7: odfdom 0.13 pulls about 20 extra jars (Jena and others, about +25 MB). This should be a separate change.

ApacheDS, LDAP API and MINA (#79, #60)

ApacheDS stays on 2.0.0.AM26, which ties LDAP API and MINA to their current lines:

  • AM26's StartTlsHandler uses SslFilter.DISABLE_ENCRYPTION_ONCE, which MINA 2.2 removed (NoSuchFieldError on every StartTLS request). It also uses NoVerificationTrustManager, which LDAP API 2.1.8 removed.
  • LDAP API 2.1.1+ imports MINA ≥ 2.2. So with AM26, the LDAP API must stay on 2.1.0 and MINA on 2.1.x.

AM27 (LDAP API 2.1.5, MINA 2.2) would lift this, but it cannot be used yet. In AM27, several bundles (apacheds-interceptors-operational, apacheds-server-config, apacheds-xdbm-partition) use org.apache.directory.api.ldap.model.schema.registries without importing it in their OSGi manifest. The embedded server then fails with ClassNotFoundException: ...ObjectClassRegistry. AM27 also drops the Kerberos protocol, which Studio's ApacheDS configuration editor still exposes. This should be fixed in ApacheDS first.

UI tests

The SWTBot UI tests had not run in CI for a long time: the Jenkins pipeline fails earlier, in the core integration tests against 389ds (see "Jenkins test lab"). They now pass again:

  • "LDAP Servers" view name: a German translation commit (9f40267) replaced the hard-coded name with %View_ServersView_name, which is "Servers" in English. That renamed the view and its category in the English UI. The English name is restored to "LDAP Servers" (German stays "Server" / "LDAP-Server").
  • The tests are adapted to Eclipse 4.41 labels: Window > Preferences..., and "New" as the title of the new wizard dialog.
  • The tests are adapted to the multi-select DN editor (ea38b9c): new DN values now use a list with Add/Remove instead of a combo with Browse.
  • The tests need a window manager. Without one, no shell is active after a dialog closes, and about 15 tests fail. The GitHub workflows run the build with xvfb-run, dbus-run-session and metacity, and upload the test reports and screenshots when the build fails.

CI

  • GitHub Actions build on JDK 21 and 25 (the JDK 11/17 workflows are removed or replaced) and always run the UI tests. Actions are updated to their current releases. Actions are pinned by SHA where they already were (build workflows, Scorecard) and use version tags in CodeQL. CodeQL now sets up Java 21 explicitly.
  • Jenkins: the Linux and Windows stages run on Java 21 with the Maven Wrapper. The Java 17 stage is removed, because the build can no longer run on 17.

Jenkins test lab

The last master builds failed in the core integration tests against 389ds. Fixes:

  • SASL plugins in 389ds. The 389ds container installs the DIGEST-MD5 and GSSAPI plugins at start. openSUSE rotated its signing key in 2026, so zypper skipped every repository and the plugins were missing. The pipeline now imports the current key over HTTPS first and uses --replacefiles, because the current packages conflict with OpenSSL 1.1 in the 389ds/dirsrv:2.2 image (this also upgrades glibc and OpenSSL inside the container).
  • 389ds stays on 2.2. 2.4, 3.0 and 3.1 answer operations below a referral entry with noSuchObject instead of a referral, which breaks the referral tests (2.2 returns the referral).
  • DIGEST-MD5 auth-conf against 389ds is skipped in three tests. The Java client picks 3DES for auth-conf, and the current openSUSE Cyrus SASL plugin fails with failed to init cipher '3des' (RC4 and DES work, on 2.2 and 3.1 alike). The exclusion names the reason and when to remove it.
  • Build image. apachedirectory/maven-build:jdk-21 is published for arm64 only and has no window manager. The pipeline builds tools/testlab/build-image (Temurin 21, GTK, Xvfb, metacity, dbus, krb5-user) and runs the build like the GitHub workflows. HOME and user.home point to /tmp/home, because the Jenkins user has no home directory in the image.

Testing

Locally on Temurin 21.0.13 with the Maven Wrapper (Maven 3.9.16):

  • ./mvnw -f pom-first.xml -U clean install, then ./mvnw clean install -Denable-ui-tests in an Ubuntu 24.04 container with xvfb-run, dbus-run-session and metacity (the same command as the GitHub workflows): BUILD SUCCESS, with product archives for Linux x86_64, macOS x86_64/aarch64 and Windows x86_64.
    • Plugin unit tests: all pass (14 + 52 + 23 + 13 + 52 + 26 + 77 + 34 + 30 + 39; 2 skipped in OpenLdapAclParserTest).
    • Core integration tests against embedded ApacheDS AM26: 82 run, 0 failures, 27 skipped. The skipped tests need GSSAPI, external OpenLDAP or 389ds, or are load tests.
    • UI tests: 384 run, 0 failures, 42 skipped (same reasons).
  • The dependencies update site contains org.dom4j and no slf4j.nop. The generated manifests import org.slf4j;version="[1.7,1.8)".
  • OSGi console in the started Linux product: all Studio bundles resolve, slf4j-eclipselog attaches to slf4j.api 1.7.36, and no errors are logged.
  • mvn -Duserguides package -f helps/pom.xml (Maven 3.9.16): the five PDF user guides are generated with FOP 2.12. The DocBook draft.png watermark is not loaded, because its http URL now redirects to https.
  • Maven 3.10.2 was tried and fails with Tycho 5.0.4 (see "Maven Wrapper").
  • The Jenkins Linux stage, reproduced locally: the testlab containers (Kerby, OpenLDAP 1.5.0, 389ds 2.2 with the command from the Jenkinsfile) on one Docker network, and the build in the tools/testlab/build-image image with the caller's uid, the workspace path and the same environment and commands as the Jenkinsfile: BUILD SUCCESS. Core integration tests 110 run, 0 failures, 1 skipped; UI tests 433 run, 0 failures, 8 skipped.

Proposal: run the test lab in GitHub Actions too (follow-up)

The GitHub workflows in this PR run every test that needs no external servers. The tests against Kerby, OpenLDAP and 389ds (GSSAPI, DIGEST-MD5, referrals, 389ds and OpenLDAP specifics) are skipped there, so only Jenkins runs them. In the local Jenkins-like run they add 28 core tests and 49 UI tests.

The test lab is not part of this PR because:

  • it makes the build depend on Docker Hub and openSUSE Tumbleweed downloads at run time;
  • it makes every PR build longer (container start, package install, the extra tests);
  • maintainers may prefer to run it only on master or on a schedule.

A possible follow-up:

  1. Move the container setup from inTestLab in the Jenkinsfile into one script, for example tools/testlab/run-in-testlab.sh <command>, that both Jenkins and GitHub Actions call. The script would:

    • create a Docker network;
    • start coheigea/kerby, osixia/openldap:1.5.0 and 389ds/dirsrv:2.2 with the same arguments as today, and wait until 389ds answers dscontainer -H and the backend exists;
    • build tools/testlab/build-image;
    • run the command in it with the same --link, krb5.conf and OPENLDAP_* / FEDORA_389DS_* settings.

    One definition keeps the two CI systems from drifting apart.

  2. Add a job to pull-request-build-openjdk21.yml, or a separate workflow for push to master, schedule and workflow_dispatch, that calls the script with the same xvfb-run … metacity … ./mvnw clean install -Denable-ui-tests command. Notes:

    • GitHub services: containers cannot be used here: they start before the checkout, so they cannot mount tools/testlab/*, and they cannot override the 389ds command.
    • The build runs as the runner's uid with HOME and user.home set to /tmp/home, as in Jenkins. The Maven cache is restored into /tmp/home/.m2.
    • On failure, upload the surefire reports, the UI screenshots and the container logs.
  3. Optionally, pin the openSUSE packages or build a small 389ds test image, so the SASL plugin install no longer depends on Tumbleweed.

The Jenkins-like run was reproduced locally (see "Testing"). A GitHub-hosted runner has not been tried.

Not verified

  • The Jenkins pipeline itself (only reproduced locally, see "Testing"): docker.build and inside on the ASF agents, and the Windows stage with the java\latest21 tool path.
  • The 389ds setup depends on current openSUSE Tumbleweed packages installed into an image from 2022; a future Tumbleweed change can break it again.
  • The GitHub workflows themselves have not run yet. The UI test command was checked in an Ubuntu 24.04 container with the same packages.
  • The macOS and Windows products were built but not started.

🤖 Generated with Claude Code

opravil-jan and others added 12 commits November 25, 2026 19:01
The antlr-maven-plugin runs antlr.Tool in-process and traps its
System.exit() with a SecurityManager. Java 18+ no longer allows
installing a SecurityManager, so the OpenLDAP ACL editor does not build
on current JDKs.

Run antlr.Tool with exec-maven-plugin in a separate JVM instead and add
the generated sources with build-helper in pom-first.xml. The
exec-maven-plugin version is now managed in the root POM (3.7.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eclipse 4.41 requires Java 21, so the build and the product now target
Java 21 (maven.compiler.release, osgi.requiredJavaVersion).

Build:
- Tycho 2.3.0 -> 5.0.4 (needs Maven 3.9.9+), parent POM 48 -> 52.
- pom-first.xml of the target platform uses 'pom' packaging, because
  Tycho 5 resolves an eclipse-target-definition before the local p2
  repository it refers to has been built. The generated .target is
  attached with build-helper, so it is still installed.

Target platform:
- Eclipse 4.41, SWTBot 4.3.0, Orbit 4.41, Babel R0.20.0.
- Drop what Eclipse 4.41 no longer ships: javax.xml,
  javax.xml.stream, jdt.launching.macosx, org.eclipse.osgi.services,
  source features, explicit EMF/ECF product features and missing
  Babel fragments.
- dom4j from Orbit (org.dom4j 2.2.0) instead of the ServiceMix bundle,
  whose javax.xml.stream [1.0,2) import no longer resolves cleanly.
- slf4j-api 1.7.36 is published locally (LDAP API and ApacheDS import
  [1.7,1.8), Eclipse ships 2.x); slf4j-nop only satisfies
  org.slf4j.impl while the target is resolved.
- commons-logging 1.2 is published locally for httpclient.

Libraries: commons-codec 1.23.0, collections4 4.6.0, io 2.22.0,
lang3 3.22.0, pool2 2.13.1, text 1.15.0, httpclient 4.5.14,
httpcore 4.4.16, BouncyCastle 1.87 (jdk18on + bcutil), Caffeine 2.9.3,
MINA 2.1.15, slf4j 1.7.36, JUnit 5.14.4 / Platform 1.14.4,
hamcrest 3.0.0, skin 1.0.3.

LDAP API stays on 2.1.0 and MINA on 2.1.x: ApacheDS 2.0.0.AM26 uses
SslFilter.DISABLE_ENCRYPTION_ONCE (removed in MINA 2.2) and LDAP API
2.1.1+ requires MINA 2.2. ApacheDS 2.0.0.AM27 cannot be used because
several of its bundles miss an Import-Package for
org.apache.directory.api.ldap.model.schema.registries.

Code: replace the removed IPageLayout.ID_RES_NAV and
setShowFastViewBars APIs.

BREAKING CHANGE: building and running Directory Studio requires Java 21.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POI 3.9 -> 6.0.0 for the XLS export. POI 5+ needs commons-math3,
  SparseBitSet and log4j-api, which are embedded next to it, and
  commons-io, commons-codec and commons-collections4 packages, which
  are imported. ExportXlsRunnable uses CellType instead of the removed
  CELL_TYPE_* constants. The embedded jar names now come from the
  version properties.
- xerces 2.11.0 -> 2.12.2 (embedded in ldapbrowser.core).
- FOP and xmlgraphics-commons 2.9 -> 2.12, xalan 2.7.2 -> 2.7.3 plus
  its serializer, which is a separate artifact since 2.7.3, and
  ant-apache-regexp 1.10.14 -> 1.10.18 for the help and user guide
  generation.

odftoolkit stays on 0.8.8 / 0.7: odfdom 0.13 pulls about 20 additional
jars and should be a separate change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build requires Java 21, so the GitHub workflows now build with
JDK 21 and 25 (the JDK 11 workflow is removed, the JDK 17 one becomes
JDK 25) and the Jenkins stages run on Java 21 only.

Update actions/checkout to v7.0.1, actions/setup-java to v6.3.0,
actions/upload-artifact to v7.0.2, github/codeql-action to v4.39.5 and
ossf/scorecard-action to v2.6.0, keeping each workflow's existing
pinning style (SHA in the build and Scorecard workflows, version tags
in CodeQL). CodeQL now sets up JDK 21 explicitly instead of relying on
the runner's default JDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commit 9f40267 (German translation improvements) replaced the
hard-coded view and category name "LDAP Servers" with
%View_ServersView_name, which is "Servers" in plugin.properties. That
renamed the view and its Show View category in the English UI, and
the UI tests no longer found the "LDAP Servers" view.

Set the English view name back to "LDAP Servers" and use the existing
View_Category_name key for the category. The German names are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The product now contains two slf4j.api bundles: 1.7.36 for the LDAP API
and ApacheDS, and 2.x from the Eclipse platform. The template editor
and the OpenLDAP ACL editor imported org.slf4j without a version, so
they could be wired to slf4j 2.x and bypass the slf4j-eclipselog
binding. Use the same range as the LDAP API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two problems in the dependencies update site (p2repositories/dependencies),
which mirrors the local target platform repository:

- org.dom4j comes from Eclipse Orbit and was missing from the update
  site, so installing the LDAP Browser into an Eclipse IDE failed on
  the org.dom4j import. Mirror that one IU from Orbit as well.
- slf4j-nop, needed only to resolve the target platform, was published,
  so p2 could pick it as the org.slf4j.impl provider and drop all LDAP
  API logging. Publish it into a separate resolution-only repository
  that is not mirrored.

Also define the versions that were written twice (dom4j, ServiceMix
ANTLR, JUnit, the Orbit URL) once as properties, and note in the rcp
feature that its slf4j.api version must match org.slf4j.bundleversion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tycho 5 needs Maven 3.9.9 or newer, but not 3.10: Maven 3.10.x
(Resolver 2.0) fails to resolve the bundles' dependencies with
"Invalid Collect Request: null". The build environments have neither:
the Jenkins image apachedirectory/maven-build:jdk-21 ships Maven 3.9.6
and GitHub's Ubuntu runners ship Maven 3.10.1.

Add the Maven Wrapper (only-script, with the distribution's SHA-256
checksum) and use it in Jenkins, the CodeQL workflow, build.sh,
build.bat and the build instructions. The testlab instructions now
use the jdk-21 image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Eclipse 4.41 labels the menu item "Preferences..." and titles the
  new wizard dialog "New" (the page title is "Select a wizard").
- Since ea38b9c a new (empty) DN value is edited in multi-select mode:
  a list with Add and Remove buttons instead of a combo with Browse.
  The DN editor bot gets an Add button and a list accessor; the entry
  editor and alias entry tests use them for new values. Existing
  values still use the single-DN dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SWTBot UI tests were never run by the GitHub workflows, and the
Jenkins pipeline stops before them because of failing core
integration tests against OpenLDAP/389ds.

Run the main build with -Denable-ui-tests under xvfb-run with metacity.
The tests need a window manager: without one, no shell is active
after a dialog closes. On failure, upload the surefire reports and the
UI test screenshots. Both workflows now use the Maven Wrapper. The
README explains how to run the UI tests locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Java DIGEST-MD5 client picks the 3DES cipher for auth-conf, and the
Cyrus SASL DIGEST-MD5 plugin that the 389ds test image installs from
openSUSE fails with "failed to init cipher '3des'" (RC4 and DES work).
Exclude 389ds from the three tests that request auth-conf until 3DES
works again in that plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apachedirectory/maven-build:jdk-21 is published for arm64 only, so it
cannot run on the amd64 agents, and it has no window manager for the UI
tests. The pipeline now builds tools/testlab/build-image (Temurin 21,
GTK, Xvfb, metacity, dbus, krb5-user) and runs the build like the
GitHub workflows: xvfb-run, dbus-run-session and metacity. HOME and
user.home point to /tmp/home, because the Jenkins user has no home
directory in the image.

The 389ds container installs the DIGEST-MD5 and GSSAPI SASL plugins at
start. Since openSUSE rotated its signing key in 2026, zypper skipped
every repository, the plugins were missing and the SASL tests against
389ds failed. Import the current key first, and use --replacefiles,
because the current packages conflict with OpenSSL 1.1 in the 2.2 image.
389ds stays on 2.2: 2.4 and later answer operations below a referral
entry with noSuchObject instead of a referral.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant