Fixing (JDK 26) build & runtime, adding regression (integration) tests - #1341
Fixing (JDK 26) build & runtime, adding regression (integration) tests#1341svanteschubert wants to merge 11 commits into
Conversation
Both protege-editor-core and protege-editor-owl bundle JARs have Import-Package entries for autovalue.shaded.* packages that are compile-time-only and unavailable at OSGi runtime, causing BundleException on startup. These failing ITs prove the problem exists before applying the fix.
Update manifest IT assertions to target the actual compile-time-only imports now excluded in the build, including errorprone concurrent annotations for editor-owl.
Fix JDK 26 annotation processing setupProblemBuilding with JDK 26 exposed instability in compilation/annotation processing (especially around AutoValue generation), including intermittent What changedAligned AutoValue artefacts to a single version via parent property: Updated compiler defaults in parent maven-compiler-plugin config: In protege-editor-owl, configured annotation processor path for default-compile to ensure AutoValue processor is applied consistently. This prevents mixed AutoValue versions and processor mismatches. Add in first commit regression integration tests for OSGi manifest import issues (make problem visible)Runtime startup failures were caused by invalid OSGi Import-Package entries (compile-time-only/shaded packages appearing as required runtime imports). This was not previously guarded by tests. Added integration tests that inspect built bundle manifests: Wired failsafe execution and passed the built jar location via bundle.jar system property where needed. Bundle Import-Package must not contain runtime-unresolvable imports like: This converts a runtime OSGi resolution failure into a CI-visible regression signal. |
Add failing IT coverage for startup exceptions in packaged launchers and for invalid runtime Import-Package entries in editor bundles.
Exclude compile-time-only imports from OSGi manifests, remove obsolete CORBA omgapi bundle from desktop assemblies, and harden LAF initialization.
Problemprotege-desktop startup failed at runtime due to invalid OSGi/runtime dependencies in packaged bundles:
Patch
Note: |
Run the GitHub Actions verify step under xvfb-run so child JVMs get DISPLAY, matching the old Travis xvfb setup. In LogManager, avoid building the log JDialog when GraphicsEnvironment.isHeadless() so ProtegeApplication static init does not throw HeadlessException without an X server.
|
After adding integration tests, running the run script and a binary dependent on the used OS, looking for exceptions in the log (failing the test if there is one), the test fails on GitHub CI tests. GitHub Actions runs on Linux without a real display. The desktop launcher integration tests start the packaged app in a child JVM; that process had no DISPLAY, so Swing failed while initialising the log UI (JOptionPane / JDialog), surfaced as HeadlessException and failed the “no Exception in output” check.
Summary: |
SummaryRecent testing revealed that while the build remains "green," the application is experiencing functional UI failures. The Pizza Ontology fails to load/render in the UI (not becoming the active ontology), but PR behaviour is similar to the last release from March. Key ProposalsFeature Regression Testing: Implement a regression test suite for every (GUI) feature. Technical Changes in this PR
Testing EnvironmentThe changes have been verified across the following configurations:
|
Enables JDK 26 compilation
I have been told that it is useful to compile with the latest JDK (e.g. 26), as it warns you what tomorrow breaks (sometimes it breaks already).
Tests
Tested successfully with three JDKs on Windows & MacOS:
Changes in
pom.xml(parent)auto-value.versionproperty (set to 1.11.1) - keeps auto-value and auto-value-annotations on a single, consistent version.<useModulePath>false</useModulePath>- maven-compiler-plugin 3.14.0 defaults to true, which on JDK 26 caused the compiler to non-deterministically fail to resolve classes across the classpath/module-path boundary.Changes in
protege-editor-owl/pom.xml<source>11</source><target>11</target>with an execution-scoped<annotationProcessorPaths>block on default-compile only - this tells javac exactly where to find the AutoValue annotation processor (needed because classpath-based discovery doesn't work reliably with this plugin/JDK combination), while keeping the default-testCompile execution free of processor path config so test classes can see production classes normally.