From c8e2f985c357ee28155232ab836ab0092462c14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Sun, 19 Jul 2026 18:28:30 +0200 Subject: [PATCH 1/2] build: add linux/aarch64 Tycho target-environment profile Add a Maven profile activated on linux/aarch64 that sets osgi.os=linux, osgi.ws=gtk, osgi.arch=aarch64. Without it, Tycho falls back to the pom's default win32 target environment on arm64 Linux and builds an unlaunchable test runtime (NoClassDefFoundError: org.eclipse.swt.SWTError, exit code 13), so SWT/UI tests cannot run in an arm64 container. Co-Authored-By: Claude Opus 4.8 (1M context) --- ddk-parent/pom.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ddk-parent/pom.xml b/ddk-parent/pom.xml index 963fc7097..53e254dd3 100644 --- a/ddk-parent/pom.xml +++ b/ddk-parent/pom.xml @@ -474,6 +474,21 @@ x86_64 + + + + linux + aarch64 + unix + + + 64bit_linux_aarch64 + + linux + gtk + aarch64 + + macosx From cccf37207f24c136ecec67aafe103350cc8f56b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Sun, 19 Jul 2026 18:28:30 +0200 Subject: [PATCH 2/2] ci: add reusable Docker build environment for headless DDK builds Add docker/Dockerfile (Maven + Temurin 21 base plus Xvfb and the GTK/X11 libraries Eclipse SWT and AWT require) and a README documenting how to run the full verify suite headlessly in a container. Runs --init so xvfb-run is not PID 1, and mounts a persistent .m2 volume to cache p2/Maven downloads between runs. Co-Authored-By: Claude Opus 4.8 (1M context) --- docker/.gitignore | 1 + docker/Dockerfile | 31 ++++++++++++++++++++++++++ docker/README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 docker/.gitignore create mode 100644 docker/Dockerfile create mode 100644 docker/README.md diff --git a/docker/.gitignore b/docker/.gitignore new file mode 100644 index 000000000..2ad9294d5 --- /dev/null +++ b/docker/.gitignore @@ -0,0 +1 @@ +*.local diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..c57f66977 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,31 @@ +FROM maven:3.9-eclipse-temurin-21 + +# Install Xvfb and the GTK libraries required by Eclipse/SWT UI tests. +# libgtk-3-0 covers the current DDK target platform; libgtk-4-1 is kept +# as a fallback for newer Eclipse releases. +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + xvfb \ + libgtk-3-0 \ + libgtk-4-1 \ + libglib2.0-0 \ + libpango-1.0-0 \ + libcairo2 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libgdk-pixbuf2.0-0 \ + libepoxy0 \ + libxcomposite1 \ + libxdamage1 \ + libxfixes3 \ + libxrandr2 \ + libxrender1 \ + libxtst6 \ + libxi6 \ + libgbm1 \ + libasound2t64 \ + libxkbcommon0 \ + && rm -rf /var/lib/apt/lists/* + +# Default working directory for mounted DDK workspace. +WORKDIR /workspace diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..bc39fffb2 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,57 @@ +# DDK Docker Build Environment + +Reusable Docker image for building and testing DSL DevKit in a Linux container. + +## Build the image + +```bash +docker build -t ddk-build docker/ +``` + +If your environment blocks `docker.io`, create a `docker/Dockerfile.local` (gitignored) that is identical to `Dockerfile` except for the first line, pointing `FROM` at a mirror of the base image available on your network: + +```dockerfile +FROM /maven:3.9-eclipse-temurin-21 +``` + +and build from that instead: + +```bash +docker build -t ddk-build -f docker/Dockerfile.local docker/ +``` + +## Run the full CI suite + +From the repository root: + +```bash +docker run --rm -it --init \ + -v "$(pwd):/workspace" \ + -w /workspace \ + ddk-build \ + xvfb-run mvn clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check \ + -f ./ddk-parent/pom.xml --batch-mode --fail-at-end -T 2C +``` + +`--init` is required: without it `xvfb-run` runs as PID 1 inside the container, never receives Xvfb's readiness signal (PID 1 ignores signals without installed handlers), and `mvn` is never started — the container hangs silently. + +To cache Maven and p2 downloads between runs (each fresh container otherwise re-downloads everything), add `-v ddk-m2:/root/.m2` to the `docker run` command. + +> **Windows / MSYS note:** mount with an absolute Windows path (e.g. `-v "C:\dev\dsl-devkit:/workspace"`) and set `MSYS_NO_PATHCONV=1` so Docker receives Unix-style container paths such as `/workspace` instead of translated Windows paths. + +> **Git worktree note:** mount a full clone, not a linked worktree. A worktree's `.git` file points at the parent clone outside the mount, so Tycho's `build-qualifier` fails with `repository not found`. If you must build from a worktree, additionally mount the parent clone's `.git` directory at the same absolute path it has on the host. + +## TLS-intercepting networks + +If the build fails to resolve Eclipse p2 or Maven repositories with `PKIX path building failed`, import your organization's CA bundle into the container's Java truststore: + +```bash +docker cp ca-bundle.pem :/tmp/ca-bundle.pem +docker exec keytool -importcert -trustcacerts -alias corporate-ca \ + -file /tmp/ca-bundle.pem -keystore /opt/java/openjdk/lib/security/cacerts \ + -storepass changeit -noprompt +``` + +## Base image + +- `maven:3.9-eclipse-temurin-21` (Docker Hub)