This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git
The following commit(s) were added to refs/heads/master by this push: new 4034f73 MSITE-851 fixed IT: jar internal timestamp cause variable local ts 4034f73 is described below commit 4034f7383df9627b5f799dda06c91a9d5f0b4564 Author: Hervé Boutemy <hbout...@apache.org> AuthorDate: Sat Nov 9 17:34:05 2019 +0100 MSITE-851 fixed IT: jar internal timestamp cause variable local ts --- src/it/projects/site-jar/verify.bsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/it/projects/site-jar/verify.bsh b/src/it/projects/site-jar/verify.bsh index c512531..4e5a08b 100644 --- a/src/it/projects/site-jar/verify.bsh +++ b/src/it/projects/site-jar/verify.bsh @@ -47,12 +47,17 @@ try JarFile jar = new JarFile( siteJar ); Enumeration jarEntries = jar.entries(); + long timestamp = -1; while ( jarEntries.hasMoreElements() ) { JarEntry entry = (JarEntry) jarEntries.nextElement(); - if ( entry.getTime() != 1572713292000L ) + if ( timestamp == -1 ) { - System.out.println( "wrong entry time for " + entry.getName() + ": " + entry.getTime() ); + timestamp = entry.getTime(); // reproducible timestamp in jar file cause local timestamp depending on timezone + } + if ( entry.getTime() != timestamp ) + { + System.out.println( "wrong entry time for " + entry.getName() + ": " + entry.getTime() + " instead of " + timestamp ); return false; } if ( !entry.isDirectory() )