opravil-jan opened a new pull request, #125:
URL: https://github.com/apache/directory-studio/pull/125
## 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 (9f40267d6) 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 (ea38b9c95): 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](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]