From 7ee1409be796abe8b1d33e51d65fa0c3d59b78c3 Mon Sep 17 00:00:00 2001 From: Alex Andres Date: Tue, 3 Nov 2026 14:02:57 +0100 Subject: [PATCH 1/3] fix: make the Java jars reproducible Every jar entry and the manifest's Build-Date take the root pom's project.build.outputTimestamp instead of the time of the build, which release:prepare updates for the release and the next development version. The unused timestamp properties are gone. --- docs/guide/build.md | 7 +++++++ pom.xml | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/guide/build.md b/docs/guide/build.md index 48382c814..d3815e1f1 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -134,6 +134,13 @@ it as `deployment-bundle-dry-run`. It pushes no commits or tags, dispatches no publication workflow, and uses placeholder Central credentials with uploads disabled. +The jars are reproducible: every entry and the manifest's `Build-Date` carry +`project.build.outputTimestamp` from the root pom instead of the time of the +build, so the same commit builds into the same Java jars. Release preparation +sets it to the time of the release commit and again for the next development +version; it needs no manual change. The native library jars are not covered, +since CMake and the compilers do not build byte for byte the same libraries. + If preparation pushed the tag but dispatch failed, start Publish release manually and select that tag. Before retrying a failed publication, check whether Maven Central already accepted the version; published releases cannot be overwritten. diff --git a/pom.xml b/pom.xml index 721fc41a0..da6b029dd 100644 --- a/pom.xml +++ b/pom.xml @@ -44,9 +44,12 @@ - ${maven.build.timestamp} UTF-8 - yyyy-MM-dd HH:mm + + 2026-10-16T19:14:36Z @@ -146,7 +149,7 @@ true ${project.version} - ${maven.build.timestamp} + ${project.build.outputTimestamp} true From d4f05d08a1ff0b079467b37d9865a629d8cf747d Mon Sep 17 00:00:00 2001 From: Alex Andres Date: Tue, 3 Nov 2026 14:02:57 +0100 Subject: [PATCH 2/3] fix: check the Maven and Java versions before building The enforcer stops a build early on Maven older than 3.9.6, which the native builds' cmake-maven-plugin needs (the docs said 3.6.3), on a JDK older than 17, and on a plugin without a pinned version; maven-clean-plugin gets one. --- docs/guide/build.md | 2 +- pom.xml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/docs/guide/build.md b/docs/guide/build.md index d3815e1f1..e8a714509 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -11,7 +11,7 @@ You don't have to install Chromium's `depot_tools`, Siso or GN: the build clones | Tool | Notes | | --------------------- | ----------------------------------------------------------------------------------------- | | JDK 17 or newer | The libraries target Java 11, and the examples need 17. | -| Maven 3.6.3 or newer | | +| Maven 3.9.6 or newer | Needed by the native builds' CMake plugin. The build checks it, and the JDK, first. | | Git | Clones `depot_tools`, the WebRTC sources and the submodules. | | CMake 3.13 or newer | Must be on the `PATH`. The Maven build does not download it. | | Python 3 | Runs `depot_tools` and the Linux sysroot script. On macOS it also needs `setuptools`. | diff --git a/pom.xml b/pom.xml index da6b029dd..74ed8540a 100644 --- a/pom.xml +++ b/pom.xml @@ -91,6 +91,11 @@ true + + org.apache.maven.plugins + maven-clean-plugin + 3.5.0 + org.sonatype.central central-publishing-maven-plugin @@ -110,6 +115,35 @@ maven-deploy-plugin 3.2.0 + + org.apache.maven.plugins + maven-enforcer-plugin + 3.6.3 + + + enforce-build-environment + + enforce + + + + + + [3.9.6,) + + + + [17,) + + + Give every plugin a version in the root pom's pluginManagement. + + + + + + org.apache.maven.plugins maven-gpg-plugin @@ -223,6 +257,10 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + org.apache.maven.plugins maven-compiler-plugin From 1684e7ae86ac6caec55fa3689ca7368144f625bc Mon Sep 17 00:00:00 2001 From: Alex Andres Date: Tue, 3 Nov 2026 14:02:57 +0100 Subject: [PATCH 3/3] fix: share the test JVM arguments with the jni-check profile The profile repeated the default argLine, so every module flag had to be added twice; it now prepends -Xcheck:jni to one property. --- webrtc/pom.xml | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/webrtc/pom.xml b/webrtc/pom.xml index 7f68364ff..3ded2d8d9 100644 --- a/webrtc/pom.xml +++ b/webrtc/pom.xml @@ -12,6 +12,24 @@ webrtc-java + + + + --add-modules java.desktop + --add-reads webrtc.java=java.desktop + --add-exports webrtc.java/dev.onvoid.webrtc.internal=ALL-UNNAMED + --add-opens webrtc.java/dev.onvoid.webrtc=ALL-UNNAMED + --add-opens webrtc.java/dev.onvoid.webrtc.logging=ALL-UNNAMED + --add-opens webrtc.java/dev.onvoid.webrtc.media=ALL-UNNAMED + --add-opens webrtc.java/dev.onvoid.webrtc.media.audio=ALL-UNNAMED + --add-opens webrtc.java/dev.onvoid.webrtc.media.video=ALL-UNNAMED + + + - - --add-modules java.desktop - --add-reads webrtc.java=java.desktop - --add-exports webrtc.java/dev.onvoid.webrtc.internal=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc.logging=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc.media=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc.media.audio=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc.media.video=ALL-UNNAMED - + ${webrtc.test.argLine} @@ -93,17 +98,7 @@ maven-surefire-plugin - - -Xcheck:jni - --add-modules java.desktop - --add-reads webrtc.java=java.desktop - --add-exports webrtc.java/dev.onvoid.webrtc.internal=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc.logging=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc.media=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc.media.audio=ALL-UNNAMED - --add-opens webrtc.java/dev.onvoid.webrtc.media.video=ALL-UNNAMED - + -Xcheck:jni ${webrtc.test.argLine}