This document helps AI coding agents work effectively with the DSL DevKit codebase.
- Type: Multi-module Tycho/Eclipse/OSGi project
- Purpose: DSL development toolkit built on Xtext
- Java: 21+
- Maven
- Tycho
- Xtext/Xtend
After cloning, run:
./.agents/sync.shThis creates a local mirror of .agents/skills/ at .claude/skills/ (gitignored) so Claude Code auto-discovers the project's skills. macOS/Linux use a symlink; Windows gets a recursive copy. Re-run after any pull that touches .agents/skills/.
| Directory | Purpose |
|---|---|
ddk-parent/ |
Parent POM, build entry point |
ddk-configuration/ |
Quality tool configs (PMD, Checkstyle, SpotBugs) |
ddk-target/ |
Eclipse target platform definition |
ddk-repository/ |
P2 update site |
com.avaloq.tools.ddk.* |
Source modules |
*.test |
Test modules |
# Full CI build (Linux - requires xvfb for UI tests)
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
# Windows build
mvn clean verify -f ./ddk-parent/pom.xml
# Quick build without tests
mvn clean verify -f ./ddk-parent/pom.xml -DskipTests
# Build specific module
mvn clean verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext
# Run only quality checks (after initial build)
mvn checkstyle:check pmd:check spotbugs:check -f ./ddk-parent/pom.xml- Ruleset:
ddk-configuration/pmd/ruleset.xml - Excludes:
src-gen/,src-model/,xtend-gen/
- Config:
ddk-configuration/checkstyle/avaloq.xml - Test config:
ddk-configuration/checkstyle/avaloq-test.xml - Only checks
src/directory
- Exclusions:
ddk-configuration/findbugs/exclusion-filter.xml - Max rank: 15, Threshold: Low
- Framework: JUnit 5 with Tycho Surefire
- Timeout: 30 minutes (1800 seconds)
- Aggregator module:
com.avaloq.tools.ddk.xtext.test - UI tests: Require virtual display (xvfb on Linux) or
-XstartOnFirstThread(macOS)
SWT on Cocoa requires the Display to be created on the main thread. UI tests
therefore need -XstartOnFirstThread. There are two contexts:
mvn verify/ CI: themacosxprofile inddk-parent/pom.xml(activated onfamily=mac) adds the flag automatically. No setup required.- Running launches from Eclipse: add
-XstartOnFirstThreadto your JRE's default VM arguments —Window > Preferences > Java > Installed JREs > [your JDK] > Edit > Default VM arguments. PDE launches withappend.args=trueinherit this on macOS only. The flag is not hardcoded in the.launchfiles because the JVM on Windows and Linux rejects it as an "Unrecognized VM option". This matches Eclipse Platform's own UI test launches (which omit the flag and rely on the same JRE-default-args mechanism).
The project runs all tests through one aggregator module, not per-.test-module. ddk-parent/pom.xml sets <skip>true</skip> on tycho-surefire-plugin globally; only com.avaloq.tools.ddk.xtext.test overrides it with its own full tycho-surefire configuration. Inside that module, src/com/avaloq/tools/ddk/xtext/AllTests.java is a JUnit 5 @Suite that @SelectClasses from ~14 per-module *TestSuite classes (ExportTestSuite, CheckCoreTestSuite, TypeSystemTestSuite, CheckUiTestSuite, etc.). Those other .test bundles are on xtext.test's OSGi classpath via Require-Bundle, so their test classes get discovered and executed inside the single Eclipse runtime spun up for xtext.test.
Consequences for agents:
- Maven will emit
[INFO] Skipping testsfor every.testmodule exceptxtext.test. This is correct, not a bug. Don't "fix" it. - Flipping
<skip>false</skip>in another.testmodule will fail — those bundles don't carry the tycho-surefire configuration (application, target-platform extras, UI harness) needed to spin up their own test runtime. "Cannot resolve dependencies" is the typical symptom. - Don't add per-module
tycho-surefireconfiguration to individual.testpoms. To register a new test, either add the test class to an existing*TestSuite, or create a new*TestSuiteclass and reference it fromAllTests.java. - Why the aggregator design: one Eclipse OSGi runtime startup (~5–10s) instead of N. With ~14 test suites, per-module execution would add ~70–140s of pure startup overhead per run for no functional benefit.
- Non-OSGi pure-POJO tests could theoretically run under plain Maven surefire without Tycho, but most tests depend on Xtext injectors, Eclipse resource APIs, or the UI workbench — so the aggregator is the right choice.
- Use
META-INF/MANIFEST.MFfor OSGi bundle dependencies (not pom.xml)
These directories contain generated code - do not edit manually:
src-gen/- Xtext generated sourcessrc-model/- EMF model generated sourcesxtend-gen/- Xtend transpiled Java sources
.xtendfiles insrc/compile to Java inxtend-gen/
- Create module directory with standard structure
- Add
META-INF/MANIFEST.MFfor OSGi metadata - Add
build.propertiesfor Tycho - Add module to
ddk-parent/pom.xmlmodules list - Follow naming convention:
com.avaloq.tools.ddk.<component>
- Check ruleset at
ddk-configuration/pmd/ruleset.xml - Violations in generated code (
src-gen/,xtend-gen/) are excluded - Run
mvn pmd:check -f ./ddk-parent/pom.xmlto verify fixes
- Check config at
ddk-configuration/checkstyle/avaloq.xml - Run
mvn checkstyle:check -f ./ddk-parent/pom.xmlto verify fixes
# Run tests for a specific module
mvn verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext.test
# On Linux, wrap with xvfb for UI tests
xvfb-run mvn verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext.test- Platform: GitHub Actions
- Workflow:
.github/workflows/verify.yml - Triggers on: push to master, pull requests