You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2022/11/13 08:53:08 UTC

[maven-assembly-plugin] branch MASSEMBLY-941 updated: [MASSEMBLY-941] dump zip content for analysis

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MASSEMBLY-941
in repository https://gitbox.apache.org/repos/asf/maven-assembly-plugin.git


The following commit(s) were added to refs/heads/MASSEMBLY-941 by this push:
     new 500b3309 [MASSEMBLY-941] dump zip content for analysis
500b3309 is described below

commit 500b330956ffbeb73a33eb10a69afdedd7b649e1
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Nov 13 09:52:59 2022 +0100

    [MASSEMBLY-941] dump zip content for analysis
---
 src/it/projects/reproducible/src/assemble/src.xml |  6 +++---
 src/it/projects/reproducible/verify.groovy        | 17 ++++++++++++++---
 src/it/projects/reproducible/zip-content.txt      | 22 ++++++++++++++++++++++
 3 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/src/it/projects/reproducible/src/assemble/src.xml b/src/it/projects/reproducible/src/assemble/src.xml
index 3f4ab153..4d5c33ee 100644
--- a/src/it/projects/reproducible/src/assemble/src.xml
+++ b/src/it/projects/reproducible/src/assemble/src.xml
@@ -31,17 +31,17 @@ under the License.
   <fileSets>
     <fileSet>
       <outputDirectory></outputDirectory>
-      <directory>src</directory>
+      <directory>src/main/resources</directory>
       <filtered>true</filtered>
       <lineEnding>lf</lineEnding>
     </fileSet>
   </fileSets>
-  <files>
+  <!--files>
     <file>
       <source>src/main/resources/executable.txt</source>
       <fileMode>0755</fileMode>
       <filtered>true</filtered>
       <lineEnding>lf</lineEnding>
     </file>
-  </files>
+  </files-->
 </assembly>
diff --git a/src/it/projects/reproducible/verify.groovy b/src/it/projects/reproducible/verify.groovy
index 9beebd90..23693002 100644
--- a/src/it/projects/reproducible/verify.groovy
+++ b/src/it/projects/reproducible/verify.groovy
@@ -25,6 +25,17 @@ File deployDir = new File( basedir, 'target/repo/org/apache/maven/its/reproducib
 
 assert deployDir.exists()
 
-assert new File( deployDir, 'reproducible-1.0-src.zip.sha1' ).text == 'abf1cf8f84b839d796d55b9e3eb7f41530f517e5'
-assert new File( deployDir, 'reproducible-1.0-src.tar.sha1' ).text == '7535236be97964050e8c4734746733c185fe1762'
-assert new File( deployDir, 'reproducible-1.0-src.jar.sha1' ).text == '18a3fd34d53bf763c3b57f82260662ab7241a20c'
+ZipFile zip = new ZipFile( new File( deployDir, "reproducible-1.0-src.zip" ) )
+StringBuilder sb = new StringBuilder()
+for( ZipArchiveEntry entry : zip.getEntries() )
+{
+    sb.append( String.format("%d %o %s\n", entry.getTime(), entry.getUnixMode(), entry.getName() ) )
+}
+
+content = new File( basedir, "zip-content.txt" ).text.replace( "\r\n", "\n" )
+effective = sb.toString()
+assert content == effective
+
+assert new File( deployDir, 'reproducible-1.0-src.zip.sha1' ).text == '50116502c6107740c2a35ef296b5abda08c5dec7'
+assert new File( deployDir, 'reproducible-1.0-src.tar.sha1' ).text == '3efc10ec9c3099ba061e58d5b2a935ba643da237'
+assert new File( deployDir, 'reproducible-1.0-src.jar.sha1' ).text == 'cc7e3a984179f63d6b37bc86c61e9cc461c62288'
diff --git a/src/it/projects/reproducible/zip-content.txt b/src/it/projects/reproducible/zip-content.txt
new file mode 100644
index 00000000..f45eb6a2
--- /dev/null
+++ b/src/it/projects/reproducible/zip-content.txt
@@ -0,0 +1,22 @@
+1566404932000 40775 dir-A/
+1566404932000 40775 dir-C/
+1566404932000 40775 dir-b/
+1566404932000 40775 dir-b/B2/
+1566404932000 40775 dir-b/B4/
+1566404932000 40775 dir-b/b1/
+1566404932000 40775 dir-b/b3/
+1566404932000 40775 dir-d/
+1566404932000 100664 Uppercase.txt
+1566404932000 100664 dir-A/A2.txt
+1566404932000 100664 dir-A/A4.txt
+1566404932000 100664 dir-A/a1.txt
+1566404932000 100664 dir-A/a3.txt
+1566404932000 100664 dir-C/C.txt
+1566404932000 100664 dir-b/B2/B2.txt
+1566404932000 100664 dir-b/B4/B4.txt
+1566404932000 100664 dir-b/b.txt
+1566404932000 100664 dir-b/b1/b1.txt
+1566404932000 100664 dir-b/b3/b3.txt
+1566404932000 100664 dir-d/d.txt
+1566404932000 100775 executable.txt
+1566404932000 100664 lowercase.txt