[ https://issues.apache.org/jira/browse/MEAR-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17179014#comment-17179014 ]
Marat Abrarov edited comment on MEAR-280 at 8/17/20, 2:47 PM: -------------------------------------------------------------- This issue looks being still actual because Maven EAR Plugin generates not reproducible EARs when skinnyWars option is used ({{<skinnyWars>true</skinnyWars>}} in {{configuration}} of Maven EAR Plugin). [MEAR-280|https://github.com/mabrarov/dockerfile-test/compare/develop...MEAR-280] branch of mabrarov/dockerfile-test repository can be used for reproducing this issue (requires Maven EAR Plugin to be built and installed into local maven repository). With skinnyWars option: {code:bash} $ git clone https://github.com/mabrarov/dockerfile-test.git && \ cd dockerfile-test && \ git checkout 0220cef03f2029aa10222d9af776ee1f79a4ae9a && \ ./mvnw clean install -e -DskipTests -Ddocker.skip=true && \ ./mvnw clean verify -e -DskipTests artifact:buildinfo -Dreference.repo=central -Ddocker.skip=true ... [WARNING] size mismatch ear-1.1.7-SNAPSHOT.ear: investigate with diffoscope target/reference/ear-1.1.7-SNAPSHOT.ear ear/target/ear-1.1.7-SNAPSHOT.ear [WARNING] Reproducible Build output summary: 1 files ok, 1 different [WARNING] see diff target/reference/app-image-1.1.7-SNAPSHOT.buildinfo app-image/target/app-image-1.1.7-SNAPSHOT.buildinfo [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for dockerfile-test 1.1.7-SNAPSHOT: [INFO] [INFO] dockerfile-test .................................... SUCCESS [ 1.381 s] [INFO] war ................................................ SUCCESS [ 1.190 s] [INFO] ear ................................................ SUCCESS [ 0.484 s] [INFO] base-image ......................................... SUCCESS [ 1.275 s] [INFO] hollow-image ....................................... SUCCESS [ 0.163 s] [INFO] app-image .......................................... SUCCESS [ 0.242 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.373 s [INFO] Finished at: 2020-08-17T17:30:00+03:00 [INFO] ------------------------------------------------------------------------ $ docker run --rm -t -w $(pwd) -v $(pwd):$(pwd):ro registry.salsa.debian.org/reproducible-builds/diffoscope target/reference/ear-1.1.7-SNAPSHOT.ear ear/target/ear-1.1.7-SNAPSHOT.ear --- target/reference/ear-1.1.7-SNAPSHOT.ear --- target/reference/ear-1.1.7-SNAPSHOT.ear +++ ear/target/ear-1.1.7-SNAPSHOT.ear ├── zipinfo -v {} │ @@ -283,15 +283,15 @@ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ minimum software version required to extract: 2.0 │ compression method: deflated │ compression sub-type (deflation): normal │ file security status: not encrypted │ extended local header: no │ file last modified on (DOS date/time): 2020 Aug 17 14:23:02 │ - 32-bit CRC value (hex): f3f3d0e7 │ + 32-bit CRC value (hex): 2af2d57d │ compressed size: 2523 bytes │ uncompressed size: 3687 bytes │ length of filename: 51 characters │ length of extra field: 0 bytes │ length of file comment: 0 characters │ disk number on which file begins: disk 1 │ apparent file type: binary ├── org.mabrarov.dockerfile-test-war-1.1.7-SNAPSHOT.war │ ├── zipinfo -v {} │ │ @@ -26,15 +26,15 @@ │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 2.0 │ │ compression method: deflated │ │ compression sub-type (deflation): normal │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 64f3c575 │ │ compressed size: 179 bytes │ │ uncompressed size: 241 bytes │ │ length of filename: 20 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -54,15 +54,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 9 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -82,15 +82,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 15 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -110,15 +110,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 44 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -138,15 +138,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 48 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -166,15 +166,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 8 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -194,15 +194,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 16 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -222,15 +222,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 12 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 {code} Without skinnyWars option: {code:bash} $ git checkout MEAR-280 && \ ./mvnw clean install -e -DskipTests -Ddocker.skip=true && \ ./mvnw clean verify -e -DskipTests artifact:buildinfo -Dreference.repo=central -Ddocker.skip=true ... [INFO] Reference build java.version: 1.8 (from MANIFEST.MF Build-Jdk-Spec) [INFO] Reference build os.name: Unix (from pom.properties newline) [INFO] Minimal buildinfo generated from downloaded artifacts: /home/user/dockerfile-test/target/reference/app-image-1.1.7-SNAPSHOT.buildinfo [INFO] Reproducible Build output summary: 2 files ok [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for dockerfile-test 1.1.7-SNAPSHOT: [INFO] [INFO] dockerfile-test .................................... SUCCESS [ 1.382 s] [INFO] war ................................................ SUCCESS [ 1.320 s] [INFO] ear ................................................ SUCCESS [ 0.422 s] [INFO] base-image ......................................... SUCCESS [ 0.993 s] [INFO] hollow-image ....................................... SUCCESS [ 0.120 s] [INFO] app-image .......................................... SUCCESS [ 0.227 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.272 s [INFO] Finished at: 2020-08-17T17:31:15+03:00 [INFO] ------------------------------------------------------------------------ {code} It looks like with skinnyWars option turned on Maven EAR Plugin repackages WAR and changes timestamps of its entries to the date & time when repackaging happens ignoring {{project.build.outputTimestamp}} maven property. was (Author: abrarovm): This issue looks being still actual because Maven EAR Plugin generates not reproducible EARs when skinnyWars option is used ({{<skinnyWars>true</skinnyWars>}} in {{configuration}} of Maven EAR Plugin). [MEAR-280|https://github.com/mabrarov/dockerfile-test/compare/develop...MEAR-280] branch of mabrarov/dockerfile-test repository can be used for reproducing this issue (requires Maven EAR Plugin to be built and installed into local maven repository). With skinnyWars option: {code:bash} $ git clone https://github.com/mabrarov/dockerfile-test.git && \ cd dockerfile-test && \ git checkout 0220cef03f2029aa10222d9af776ee1f79a4ae9a && \ ./mvnw clean install -e -DskipTests -Ddocker.skip=true && \ ./mvnw clean verify -e -DskipTests artifact:buildinfo -Dreference.repo=central -Ddocker.skip=true ... [WARNING] size mismatch ear-1.1.7-SNAPSHOT.ear: investigate with diffoscope target/reference/ear-1.1.7-SNAPSHOT.ear ear/target/ear-1.1.7-SNAPSHOT.ear [WARNING] Reproducible Build output summary: 1 files ok, 1 different [WARNING] see diff target/reference/app-image-1.1.7-SNAPSHOT.buildinfo app-image/target/app-image-1.1.7-SNAPSHOT.buildinfo [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for dockerfile-test 1.1.7-SNAPSHOT: [INFO] [INFO] dockerfile-test .................................... SUCCESS [ 1.381 s] [INFO] war ................................................ SUCCESS [ 1.190 s] [INFO] ear ................................................ SUCCESS [ 0.484 s] [INFO] base-image ......................................... SUCCESS [ 1.275 s] [INFO] hollow-image ....................................... SUCCESS [ 0.163 s] [INFO] app-image .......................................... SUCCESS [ 0.242 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.373 s [INFO] Finished at: 2020-08-17T17:30:00+03:00 [INFO] ------------------------------------------------------------------------ $ docker run --rm -t -w $(pwd) -v $(pwd):$(pwd):ro registry.salsa.debian.org/reproducible-builds/diffoscope target/reference/ear-1.1.7-SNAPSHOT.ear ear/target/ear-1.1.7-SNAPSHOT.ear --- target/reference/ear-1.1.7-SNAPSHOT.ear --- target/reference/ear-1.1.7-SNAPSHOT.ear +++ ear/target/ear-1.1.7-SNAPSHOT.ear ├── zipinfo -v {} │ @@ -283,15 +283,15 @@ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ minimum software version required to extract: 2.0 │ compression method: deflated │ compression sub-type (deflation): normal │ file security status: not encrypted │ extended local header: no │ file last modified on (DOS date/time): 2020 Aug 17 14:23:02 │ - 32-bit CRC value (hex): f3f3d0e7 │ + 32-bit CRC value (hex): 2af2d57d │ compressed size: 2523 bytes │ uncompressed size: 3687 bytes │ length of filename: 51 characters │ length of extra field: 0 bytes │ length of file comment: 0 characters │ disk number on which file begins: disk 1 │ apparent file type: binary ├── org.mabrarov.dockerfile-test-war-1.1.7-SNAPSHOT.war │ ├── zipinfo -v {} │ │ @@ -26,15 +26,15 @@ │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 2.0 │ │ compression method: deflated │ │ compression sub-type (deflation): normal │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 64f3c575 │ │ compressed size: 179 bytes │ │ uncompressed size: 241 bytes │ │ length of filename: 20 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -54,15 +54,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 9 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -82,15 +82,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 15 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -110,15 +110,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 44 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -138,15 +138,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 48 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -166,15 +166,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 8 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -194,15 +194,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 16 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 │ │ @@ -222,15 +222,15 @@ │ │ file system or operating system of origin: Unix │ │ version of encoding software: 2.0 │ │ minimum file system compatibility required: MS-DOS, OS/2 or NT FAT │ │ minimum software version required to extract: 1.0 │ │ compression method: none (stored) │ │ file security status: not encrypted │ │ extended local header: no │ │ - file last modified on (DOS date/time): 2020 Aug 17 17:36:34 │ │ + file last modified on (DOS date/time): 2020 Aug 17 17:36:40 │ │ 32-bit CRC value (hex): 00000000 │ │ compressed size: 0 bytes │ │ uncompressed size: 0 bytes │ │ length of filename: 12 characters │ │ length of extra field: 0 bytes │ │ length of file comment: 0 characters │ │ disk number on which file begins: disk 1 {code} Without {{skinnyWars}} option: {code:bash} $ git checkout MEAR-280 && \ ./mvnw clean install -e -DskipTests -Ddocker.skip=true && \ ./mvnw clean verify -e -DskipTests artifact:buildinfo -Dreference.repo=central -Ddocker.skip=true ... [INFO] Reference build java.version: 1.8 (from MANIFEST.MF Build-Jdk-Spec) [INFO] Reference build os.name: Unix (from pom.properties newline) [INFO] Minimal buildinfo generated from downloaded artifacts: /home/user/dockerfile-test/target/reference/app-image-1.1.7-SNAPSHOT.buildinfo [INFO] Reproducible Build output summary: 2 files ok [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for dockerfile-test 1.1.7-SNAPSHOT: [INFO] [INFO] dockerfile-test .................................... SUCCESS [ 1.382 s] [INFO] war ................................................ SUCCESS [ 1.320 s] [INFO] ear ................................................ SUCCESS [ 0.422 s] [INFO] base-image ......................................... SUCCESS [ 0.993 s] [INFO] hollow-image ....................................... SUCCESS [ 0.120 s] [INFO] app-image .......................................... SUCCESS [ 0.227 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.272 s [INFO] Finished at: 2020-08-17T17:31:15+03:00 [INFO] ------------------------------------------------------------------------ {code} It looks like with skinnyWars option turned on Maven EAR Plugin repackages WAR and changes timestamps of its entries to the date & time when repackaging happens ignoring {{project.build.outputTimestamp}} maven property. > Reproducible Builds: make entries in output ear files reproducible (order + > timestamp) > -------------------------------------------------------------------------------------- > > Key: MEAR-280 > URL: https://issues.apache.org/jira/browse/MEAR-280 > Project: Maven Ear Plugin > Issue Type: New Feature > Affects Versions: 3.0.2 > Reporter: Herve Boutemy > Assignee: Herve Boutemy > Priority: Major > Fix For: 3.1.0 > > > since an ear file is a zip file, entries order and timestamp are a natural > source of non Reproducible Builds: > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318 -- This message was sent by Atlassian Jira (v8.3.4#803005)