Building
Requirements
Building requires JDK 21 or newer, which Tycho needs to run the build; the plugin itself targets Java 17.
The repository includes the Maven Wrapper (mvnw, or mvnw.cmd on Windows),
which downloads and runs the Maven version the build needs.
Use it for all build operations instead of a separately installed mvn.
Building and Testing
# Build, run all tests (UI tests open a workbench window), and assemble the update site
./mvnw clean verify
# Same, against the newest Eclipse release instead of the oldest supported one
./mvnw clean verify -Platest-target
# Build and test only the core bundle (plain JUnit tests, no workbench): the fast inner loop
./mvnw clean verify -pl releng/org.dbunit.eclipse.target,bundles/org.dbunit.eclipse.dataset.core
# Skip tests
./mvnw clean verify -DskipTestsThe core-only build lists the target platform module in -pl because -am does not find it.
On Linux without a display, run the build under Xvfb: xvfb-run -a ./mvnw clean verify.
Static Analysis
./mvnw clean verify also analyzes the core and UI bundles, and fails on any finding:
- SpotBugs analyzes the compiled classes at its highest effort and lowest threshold.
Skip it with
-Dspotbugs.skip. - Error Prone is a javac plugin, so it runs in a second, analysis-only javac pass
after Tycho’s compile: Tycho compiles with the Eclipse compiler, which cannot run it.
The pass compiles the same sources with the same classpath into
target/error-prone-classes, which the build discards; the shipped classes still come from the Eclipse compiler. Any warning fails the build. Skip it with-Dmaven.main.skip. - PMD checks the main Java sources against
src/code-audit-rules/pmd-ruleset.xml. Skip it with-Dpmd.skip=true.
Fix a finding instead of suppressing it.
When a SpotBugs finding does not apply to the design, add an entry with the reason to
src/code-audit-rules/spotbugs-exclude.xml; each entry names the class, the field, and the pattern,
so that the same finding anywhere else is still reported.
For an Error Prone finding, put @SuppressWarnings("CheckName") on the smallest element,
and for a PMD violation @SuppressWarnings("PMD.RuleName"),
with a comment that gives the reason.
Installing a Local Build
The update site is assembled in releng/org.dbunit.eclipse.repository/target/repository/
and zipped as releng/org.dbunit.eclipse.repository/target/org.dbunit.eclipse.repository-VERSION.zip.
Install either into Eclipse with Help > Install New Software… > Add… > Local… (or Archive…).
The version qualifier of the bundles and the feature comes from project.build.outputTimestamp in the root pom.xml,
which changes only per release, so every build between two releases has the same version,
and Eclipse does not offer a rebuilt plugin as an update to the one that is installed.
build-local.sh (build-local.cmd on Windows) builds with the current UTC time as the qualifier instead,
so that each build is newer than the one before:
# Run clean install
./build-local.sh
# Run the given Maven arguments instead
./build-local.sh clean verify -DskipTests

