From d56cbfa1e5bbaf72d29d8c4316adaf7febd97e10 Mon Sep 17 00:00:00 2001 From: DemchaAV Date: Sun, 31 May 2026 12:51:44 +0100 Subject: [PATCH] test(build): add no-poi Maven profile to validate poi-ooxml stays optional (I1) Wires up Track I1 from the readiness taskboard. poi-ooxml is declared optional in pom.xml; this PR adds the regression gate that proves the rest of the canonical suite runs without it. Profile: -P no-poi excludes poi-ooxml + poi + poi-ooxml-lite from surefire classpath via classpathDependencyExcludes and sets no.poi=true system property. DocxSemanticBackendTest (whole class) and DocumentSessionTest#semanticBackendsShouldExportManifestsFromDocumentGraph carry @DisabledIfSystemProperty so they skip cleanly. New no-poi-suite CI job runs the profile on every PR. Local run: 1029 tests, 0 failures, 4 skipped under -P no-poi. --- .github/workflows/ci.yml | 28 ++++++++++++++++ CHANGELOG.md | 12 +++++++ pom.xml | 33 +++++++++++++++++++ .../document/api/DocumentSessionTest.java | 3 ++ .../semantic/DocxSemanticBackendTest.java | 10 ++++++ 5 files changed, 86 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 224c468e..c631504e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,34 @@ jobs: path: examples/target/generated-pdfs/** if-no-files-found: error + no-poi-suite: + name: Test suite without poi-ooxml (optional-deps regression) + if: github.event_name == 'pull_request' + needs: architecture-and-documentation-guards + runs-on: ubuntu-latest + env: + JAVA_TOOL_OPTIONS: -Djava.awt.headless=true + + steps: + - name: Check out repository + uses: actions/checkout@v6 + + - name: Set up Temurin JDK 17 + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: '17' + cache: maven + + - name: Run suite under -P no-poi + # poi-ooxml is declared true; this job + # validates that callers who don't render DOCX still get a + # green suite without the POI footprint. Tests that require + # poi (DocxSemanticBackend output) carry + # @DisabledIfSystemProperty(named = "no.poi", matches = "true") + # and skip cleanly. See Track I1 in the readiness taskboard. + run: ./mvnw -B -ntp test -pl . -P no-poi + binary-compat: name: Binary Compatibility (japicmp vs v1.6.5) if: github.event_name == 'pull_request' diff --git a/CHANGELOG.md b/CHANGELOG.md index ae820fab..d2e8350b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,18 @@ JitPack continue to resolve through the existing coordinates. excluded by convention (`InternalAnnotationCoverageTest` covers those). Method-level `@since` backfill for the ~380 public methods in these packages is intentionally out of scope here and tracked separately. +- **`no-poi` Maven profile + CI job** (Track I1). The `poi-ooxml` + dependency is declared `true` so callers that + render only PDFs don't pay the ~10 MB POI footprint; this PR adds a + regression gate that proves it. Running `./mvnw -P no-poi test -pl .` + excludes `poi-ooxml` (and its `poi` / `poi-ooxml-lite` transitives) + from the surefire test classpath and sets the system property + `no.poi=true`. DOCX-specific tests (`DocxSemanticBackendTest` and the + one DOCX export in `DocumentSessionTest`) now carry + `@DisabledIfSystemProperty(named = "no.poi", matches = "true")` and + skip cleanly. The rest of the canonical suite (1029 tests, 4 skipped + under `-P no-poi`) runs green without POI on the classpath. A new + `no-poi-suite` CI job exercises the profile on every pull request. ### Public API diff --git a/pom.xml b/pom.xml index 7242a31c..9428937b 100644 --- a/pom.xml +++ b/pom.xml @@ -361,6 +361,39 @@ + + + no-poi + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven.surefire.plugin.version} + + + org.apache.poi:poi-ooxml + org.apache.poi:poi + org.apache.poi:poi-ooxml-lite + + + true + + + + + + +