jira-importer commented on issue #448:
URL: 
https://github.com/apache/maven-ear-plugin/issues/448#issuecomment-2955295172

   **[Marat 
Abrarov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=abrarovm)**
 commented
   
   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 and [Maven Artifact 
Plugin](https://github.com/apache/maven-artifact-plugin) to be built and 
installed into local maven repository).
   
   With skinnyWars option:
   
   ```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
   ```
   
   Without skinnyWars option:
   
   ```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] 
------------------------------------------------------------------------
   ```
   
   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.
   
   Refer to [pull request 
#10](https://github.com/apache/maven-ear-plugin/pull/10) in 
apache/maven-ear-plugin GitHub project for possible fix.
   
   [Hervé 
Boutemy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hboutemy), 
could you please take a look at this comment?
   
   I opened MEAR-283 bug for this issue.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to