Hi Matt, On 8.07.2025 22:14, Matt Sicker wrote: > gist-og-image-54fd7dc0713e.png > gist:54c8222bd8ef3dabd690994ab35d85d2 > <https://gist.github.com/jvz/54c8222bd8ef3dabd690994ab35d85d2> > gist.github.com > <https://gist.github.com/jvz/54c8222bd8ef3dabd690994ab35d85d2> > > <https://gist.github.com/jvz/54c8222bd8ef3dabd690994ab35d85d2> > > Logs say the diff is mainly due to compression levels. > Thanks! I was eventually able to reproduce the issue as well. The differences appear to stem from the embedded |pom.xml| and involve the Gradle Module Metadata Maven Plugin.
Before publication, the |pom.xml| is modified in two steps: 1. The |revision| property is resolved by the Flatten Maven Plugin. 2. A |<!-- do_not_remove: published-with-gradle-metadata -->| comment is inserted by the GMM Maven Plugin. The release candidate includes this comment, while your local build does not. This could be due to a variation in plugin execution order—both the Maven Source Plugin and the GMM Maven Plugin are bound to the |package| phase, so the final result can depend on which one runs first. What’s curious is that, in both Maven 3.9.8 and 3.9.10, the Source Plugin execution is listed first in the effective POM, so I would have expected the comment *not* to appear in the |-sources.jar|. By the way: since XML comments can be ignored by parsers, they’re stripped out by the Flatten Plugin before the final |pom.xml| is written. Kudos to whoever chose to use a comment rather than something like a |published-with-gradle-metadata| property. Best, Piotr PS: I attach my result of running `diffoscope` below: --- log4j-api/target/reference/org.apache.logging.log4j/log4j-api-2.25.1-sources.jar +++ log4j-api/target/log4j-api-2.25.1-sources.jar ├── zipinfo {} │ @@ -1,8 +1,8 @@ │ -Zip file size: 293959 bytes, number of entries: 177 │ +Zip file size: 293922 bytes, number of entries: 177 │ drwxr-xr-x 2.0 unx 0 b- stor 25-Jul-05 19:48 META-INF/ │ -rw-r--r-- 2.0 unx 64 b- defN 25-Jul-05 19:48 META-INF/MANIFEST.MF │ drwxr-xr-x 2.0 unx 0 b- stor 25-Jul-05 19:48 org/ │ drwxr-xr-x 2.0 unx 0 b- stor 25-Jul-05 19:48 org/apache/ │ drwxr-xr-x 2.0 unx 0 b- stor 25-Jul-05 19:48 org/apache/logging/ │ drwxr-xr-x 2.0 unx 0 b- stor 25-Jul-05 19:48 org/apache/logging/log4j/ │ drwxr-xr-x 2.0 unx 0 b- stor 25-Jul-05 19:48 org/apache/logging/log4j/internal/ │ @@ -170,10 +170,10 @@ │ -rw-r--r-- 2.0 unx 8556 b- defN 25-Jul-05 19:48 org/apache/logging/log4j/util/Timer.java │ -rw-r--r-- 2.0 unx 1368 b- defN 25-Jul-05 19:48 org/apache/logging/log4j/util/TriConsumer.java │ -rw-r--r-- 2.0 unx 10556 b- defN 25-Jul-05 19:48 org/apache/logging/log4j/util/Unbox.java │ -rw-r--r-- 2.0 unx 7589 b- defN 25-Jul-05 19:48 org/apache/logging/log4j/util/internal/SerializationUtil.java │ -rw-r--r-- 2.0 unx 1162 b- defN 25-Jul-05 19:48 org/apache/logging/log4j/util/package-info.java │ -rw-r--r-- 2.0 unx 1645 b- defN 25-Jul-05 19:48 Log4j-charsets.properties │ -rw-r--r-- 2.0 unx 143 b- defN 25-Jul-05 19:48 META-INF/native-image/org.apache.logging.log4j/log4j-api/resource-config.json │ --rw-r--r-- 2.0 unx 4513 b- defN 25-Jul-05 19:48 META-INF/maven/org.apache.logging.log4j/log4j-api/pom.xml │ +-rw-r--r-- 2.0 unx 4458 b- defN 25-Jul-05 19:48 META-INF/maven/org.apache.logging.log4j/log4j-api/pom.xml │ -rw-r--r-- 2.0 unx 69 b- defN 25-Jul-05 19:48 META-INF/maven/org.apache.logging.log4j/log4j-api/pom.properties │ -177 files, 1236315 bytes uncompressed, 263029 bytes compressed: 78.7% │ +177 files, 1236260 bytes uncompressed, 262992 bytes compressed: 78.7% ├── META-INF/maven/org.apache.logging.log4j/log4j-api/pom.xml │ ├── META-INF/maven/org.apache.logging.log4j/log4j-api/pom.xml │ │ @@ -13,15 +13,14 @@ │ │ ~ distributed under the License is distributed on an "AS IS" BASIS, │ │ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. │ │ ~ See the License for the specific language governing permissions and │ │ ~ limitations under the License. │ │ --> │ │ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> │ │ <modelVersion>4.0.0</modelVersion> │ │ - <!-- do_not_remove: published-with-gradle-metadata --> │ │ <parent> │ │ <groupId>org.apache.logging.log4j</groupId> │ │ <artifactId>log4j</artifactId> │ │ <version>2.25.1</version> │ │ <relativePath>../log4j-parent</relativePath> │ │ </parent> │ │ <artifactId>log4j-api</artifactId>