[
https://issues.apache.org/jira/browse/MSHADE-420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17695357#comment-17695357
]
Niels Basjes commented on MSHADE-420:
-------------------------------------
I suspect that this shift is caused by the same rootcause as this problem which
I reported today: [https://github.com/spring-projects/spring-boot/issues/34424]
Here the Apache commons compress receives a timestamp for a file that is to be
placed in a zip file as an epoch (without timezone): a FileTime only holds the
epoch.
Then during the creation of the actual file in
org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream this epoch
time is converted into a human readable form and then into bytes again using a
Calendar that is retrieved as Calendar.getInstance();
The effect is that the files do get the correct timestamp but it is offset by
the Timezone of the build machine.
I suspect this local timezone usage in this Zip implementation may very well be
the rootcause behind this problem too.
Perhaps you can try something like this (with the correct timezone) ?
TZ=Europe/Amsterdam mvn clean verify ...
or
mvn -Duser.timezone=Europe/Amsterdam clean verify ...
> Reproducible Builds timestamp issue in some cases
> -------------------------------------------------
>
> Key: MSHADE-420
> URL: https://issues.apache.org/jira/browse/MSHADE-420
> Project: Maven Shade Plugin
> Issue Type: Bug
> Affects Versions: 3.2.4
> Reporter: Herve Boutemy
> Priority: Major
>
> seen in Tika
> https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/tika/tika-2.4.0.diffoscope
> maven-shade-plugin 3.2.4 has an issue with timestamps in unexplained
> circumstances:
> why does 21-Nov-20 20:25 from reference become 21-Nov-21 01:25 in rebuild?
> why does 20-May-14 07:15 from reference become 20-May-14 11:15 in rebuild?
> could be related to the timezone of the rebuilder?
> {noformat}
> 21 / 44 target/reference/tika-parser-nlp-package-2.4.0.jar
> tika-parsers/tika-parsers-ml/tika-parser-nlp-package/target/tika-parser-nlp-package-2.4.0.jar
> --- target/reference/tika-parser-nlp-package-2.4.0.jar
> +++
> tika-parsers/tika-parsers-ml/tika-parser-nlp-package/target/tika-parser-nlp-package-2.4.0.jar
> ├── zipinfo {}
> │ @@ -9868,1231 +9868,1231 @@
> │ -rw---- 2.0 fat 2653 bl defN 22-Apr-08 17:41
> schemas/wsdl/ws-addr-wsdl.xsd
> │ -rw---- 2.0 fat 5591 bl defN 22-Apr-08 17:41
> schemas/wsdl/ws-addr.xsd
> │ -rw---- 2.0 fat 1606 bl defN 22-Apr-08 17:41 schemas/wsdl/wsdl.xjb
> │ -rw---- 2.0 fat 12126 bl defN 22-Apr-08 17:41 schemas/wsdl/wsdl.xsd
> │ -rw---- 2.0 fat 8198 bl defN 22-Apr-08 17:41 schemas/wsdl/wsrm.xsd
> │ -rw---- 2.0 fat 932 bl defN 22-Apr-08 17:41 schemas/wsdl/xmime.xsd
> │ -rw---- 2.0 fat 5840 bl defN 22-Apr-08 17:41 schemas/wsdl/xml.xsd
> │ --rw---- 2.0 fat 0 bl defN 21-Nov-20 20:25
> META-INF/maven/com.fasterxml.woodstox/
> │ --rw---- 2.0 fat 0 bl defN 21-Nov-20 20:25
> META-INF/maven/com.fasterxml.woodstox/woodstox-core/
> │ --rw---- 2.0 fat 70 bl defN 21-Nov-20 20:25
> META-INF/maven/com.fasterxml.woodstox/woodstox-core/pom.properties
> │ --rw---- 2.0 fat 15917 bl defN 21-Nov-20 20:25
> META-INF/maven/com.fasterxml.woodstox/woodstox-core/pom.xml
> │ --rw---- 2.0 fat 0 bl defN 21-Nov-20 20:25 com/ctc/
> │ --rw---- 2.0 fat 0 bl defN 21-Nov-20 20:25 com/ctc/wstx/
> │ --rw---- 2.0 fat 0 bl defN 21-Nov-20 20:25 com/ctc/wstx/api/
> ...
> │ --rw---- 2.0 fat 722 bl defN 20-May-14 07:15
> org/codehaus/stax2/validation/XMLValidationSchema.class
> │ --rw---- 2.0 fat 7795 bl defN 20-May-14 07:15
> org/codehaus/stax2/validation/XMLValidationSchemaFactory.class
> │ --rw---- 2.0 fat 1801 bl defN 20-May-14 07:15
> org/codehaus/stax2/validation/XMLValidator.class
> │ +-rw---- 2.0 fat 0 bl defN 21-Nov-21 01:25
> META-INF/maven/com.fasterxml.woodstox/
> │ +-rw---- 2.0 fat 0 bl defN 21-Nov-21 01:25
> META-INF/maven/com.fasterxml.woodstox/woodstox-core/
> │ +-rw---- 2.0 fat 70 bl defN 21-Nov-21 01:25
> META-INF/maven/com.fasterxml.woodstox/woodstox-core/pom.properties
> │ +-rw---- 2.0 fat 15917 bl defN 21-Nov-21 01:25
> META-INF/maven/com.fasterxml.woodstox/woodstox-core/pom.xml
> │ +-rw---- 2.0 fat 0 bl defN 21-Nov-21 01:25 com/ctc/
> │ +-rw---- 2.0 fat 0 bl defN 21-Nov-21 01:25 com/ctc/wstx/
> │ +-rw---- 2.0 fat 0 bl defN 21-Nov-21 01:25 com/ctc/wstx/api/
> ...
> │ +-rw---- 2.0 fat 722 bl defN 20-May-14 11:15
> org/codehaus/stax2/validation/XMLValidationSchema.class
> │ +-rw---- 2.0 fat 7795 bl defN 20-May-14 11:15
> org/codehaus/stax2/validation/XMLValidationSchemaFactory.class
> │ +-rw---- 2.0 fat 1801 bl defN 20-May-14 11:15
> org/codehaus/stax2/validation/XMLValidator.class
> │ -rw---- 2.0 fat 0 bl defN 21-Sep-14 14:41
> META-INF/maven/org.apache.ws.xmlschema/
> │ -rw---- 2.0 fat 0 bl defN 21-Sep-14 14:41
> META-INF/maven/org.apache.ws.xmlschema/xmlschema-core/
> │ -rw---- 2.0 fat 146 bl defN 21-Sep-14 14:41
> META-INF/maven/org.apache.ws.xmlschema/xmlschema-core/pom.properties
> │ -rw---- 2.0 fat 6857 bl defN 21-Sep-14 14:41
> META-INF/maven/org.apache.ws.xmlschema/xmlschema-core/pom.xml
> │ -rw---- 2.0 fat 0 bl defN 21-Sep-14 14:41 org/apache/ws/
> │ -rw---- 2.0 fat 0 bl defN 21-Sep-14 14:41 org/apache/ws/commons/
> │ -rw---- 2.0 fat 0 bl defN 21-Sep-14 14:41
> org/apache/ws/commons/schema/
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)