Skip to content

[2.x]: GH-1724: Make the build reproducible - #1729

Draft
rzo1 wants to merge 1 commit into
opennlp-2.xfrom
bp-2.x-gh-1724
Draft

rzo1 wants to merge 1 commit into
opennlp-2.xfrom
bp-2.x-gh-1724

Conversation

@rzo1

@rzo1 rzo1 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Backport of #1727 to 2.x (#1724). Draft until #1727 is merged; the commit reference will then be updated to the merge commit.

Declares project.build.outputTimestamp (set to the 2.5.13 release time), adds the PDF post-processing step of opennlp-docs and .mvn/jvm.config, as on main (see #1727 for why the PDF needs it). In addition, opennlp-distr is now the last module: it was built before opennlp-dl, so the binary archives contained the opennlp-dl apidocs of an earlier build, or none. Two clean builds now give identical jars and archives, and the PDF is the same when built in another time zone.

Declare project.build.outputTimestamp in the root pom.xml, set to the
time of the 2.5.13 release. Builds inherited the value of the Apache
parent POM, and maven-release-plugin only sets it to the release time
when the project declares it.

FOP writes the build time and a random ID into the PDF manual. Replace
them after rendering with project.build.outputTimestamp and a checksum
of the content, and run Maven in UTC (.mvn/jvm.config), because FOP
writes the time zone with a length that depends on it.

Build opennlp-distr last, so that the binary archives always contain the
apidocs of opennlp-dl from the same build instead of those left over
from an earlier one.

Backport of #1727 (afdf355, 4f2dcd0)

Signed-off-by: Richard Zowalla <rzo1@apache.org>
@rzo1 rzo1 added this to the 2.5.14 milestone Dec 3, 2026
@rzo1 rzo1 added task Maintenance or housekeeping work (Jira: Task) component: build Build, packaging, CI and test infrastructure backport: 2.x Also needs to go to the opennlp-2.x branch labels Dec 3, 2026
@rzo1 rzo1 self-assigned this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: 2.x Also needs to go to the opennlp-2.x branch component: build Build, packaging, CI and test infrastructure task Maintenance or housekeeping work (Jira: Task)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant