This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch MSOURCES-120
in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git
The following commit(s) were added to refs/heads/MSOURCES-120 by this push:
new a734f27 dumping more info to detect unexpected differences on some
platforms
a734f27 is described below
commit a734f2739b4d13c3dab437a2c8f38607e8c325f5
Author: Hervé Boutemy <[email protected]>
AuthorDate: Mon Sep 2 00:23:49 2019 +0200
dumping more info to detect unexpected differences on some platforms
---
src/it/reproducible/verify.groovy | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/it/reproducible/verify.groovy
b/src/it/reproducible/verify.groovy
index 8556b74..579a079 100644
--- a/src/it/reproducible/verify.groovy
+++ b/src/it/reproducible/verify.groovy
@@ -35,13 +35,25 @@ StringBuffer r = new StringBuffer()
r.append( "reproducible-1.0-sources.jar sha1 = $sha1\n\n" )
File jarFile = new File( deployDir, 'reproducible-1.0-sources.jar' )
+ZipFile zipFile = new ZipFile( jarFile );
-r.append( 'M size (cmp) crc time mode name -comment\n' )
+r.append( 'encoding: ' + zipFile.getEncoding() + '\n' )
+r.append( 'M size (cmp) crc time mode name -comment; extra\n' )
+
+String describeExtra( ZipExtraField[] extras )
+{
+ StringBuffer b = new StringBuffer()
+ b.append( extras.length )
+ for( ZipExtraField extra : extras )
+ {
+ b.append( sprintf( " [%s]%x", extra.getHeaderId().toString(),
getLocalFileDataData() ) )
+ }
+ return b.toString()
+}
-ZipFile zipFile = new ZipFile( jarFile );
for ( ZipArchiveEntry zae : zipFile.getEntries() )
{
- r.append( sprintf( "%d %4d (%3d) %8x %d %6o %s %s\n", zae.getMethod(),
zae.getSize(), zae.getCompressedSize(), zae.getCrc(), zae.getTime(),
zae.getUnixMode(), zae.getName(), ( zae.getComment() == null ) ? '-' :
zae.getComment() ) )
+ r.append( sprintf( "%d %4d (%3d) %8x %d %6o %s %s; %s\n", zae.getMethod(),
zae.getSize(), zae.getCompressedSize(), zae.getCrc(), zae.getTime(),
zae.getUnixMode(), zae.getName(), ( zae.getComment() == null ) ? '-' :
zae.getComment(), describeExtra( zae.getExtraFields() ) ) )
}
zipFile.close();