Skip to content

Migrate to Apache Tika 4.0.0 - #6754

Merged
milamberspace merged 1 commit into
apache:masterfrom
milamberspace:tika-4.0-migration
Aug 27, 2026
Merged

Migrate to Apache Tika 4.0.0#6754
milamberspace merged 1 commit into
apache:masterfrom
milamberspace:tika-4.0-migration

Conversation

@milamberspace

Copy link
Copy Markdown
Contributor

Summary

Updates Apache Tika from 3.2.3 to the newly released 4.0.0 GA.

  • Bump tika-core to 4.0.0 in bom-thirdparty.
  • Drop the tika-parsers aggregator: it is packaging=pom and declared
    non-transitive, so it shipped no jar — it only dragged extra BOMs
    (grpc/azure/jetty/testcontainers) into dependency verification. JMeter
    bundles only tika-core; document parsing still relies on a
    user-supplied tika-app.jar at runtime.

API changes handled

  • TikaConfig was removed in 4.x. In HTTPFileArg and
    ParseCurlCommandAction it was only used to set
    initializableProblemHandler="ignore", which is off the MIME-detection
    path (tika.detect uses detectors, not parsers). Replaced with a plain
    new Tika() and deleted the now-unused tika-config.xml.
  • Parser.parse now requires a TikaInputStream. Document now wraps
    its byte array with TikaInputStream.get(...). Body text extraction is
    unchanged (BodyContentHandler still emits plain text by default).

Build / infrastructure

  • Add trusted keys for the BOMs imported by tika-core's parent POM
    (com.azure, io.grpc, org.eclipse.jetty, org.testcontainers) in
    gradle/verification-metadata.xml. No jars from these are pulled — only
    their .pom signatures are validated.
  • Update the expected release jar entry to tika-core-4.0.0.jar.
  • Update the "Non-functional changes" changelog entry to Tika 4.x.

Testing

  • ./gradlew :src:core:classes :src:protocol:http:classes style — pass.
  • :src:protocol:http:test for TestHTTPFileArg, TestHTTPFileArgs,
    ParseCurlCommandActionTest — 30 passed, 0 failed.
  • :src:dist:verifyReleaseDependencies — runtime classpath matches the
    expected jar list; signatures validated across the full runtime graph.

Note (out of scope)

Document.java still keys its "missing tika" hint off
java.class.path contains "tika-app". In 4.x tika-app ships as a zip
distribution rather than a fat jar, so that heuristic is now stale — left
untouched here as it concerns user runtime setup, not this build.

🤖 Generated with Claude Code

Bump tika-core to 4.0.0 and drop the no-op tika-parsers aggregator
(packaging=pom, non-transitive: it shipped no jar and only pulled
extra BOMs into dependency verification).

Replace the removed TikaConfig with a plain Tika() for MIME detection
in HTTPFileArg and ParseCurlCommandAction, and delete the now-unused
tika-config.xml. Wrap the Parser.parse input in TikaInputStream in
Document, as the Parser interface now requires it in 4.x.

Add trusted keys for the BOMs imported by tika-core's parent POM
(com.azure, io.grpc, org.eclipse.jetty, org.testcontainers) and update
the expected release jar entry to tika-core-4.0.0.jar.

Reflect the bump in the 6.0.0 "Non-functional changes" changelog entry
(the dev cycle already moved 1.x -> 3.x; update it to 4.x).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@milamberspace
milamberspace requested a review from vlsi August 26, 2026 18:49
@milamberspace
milamberspace merged commit 9457d72 into apache:master Aug 27, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant