List of usage examples for org.springframework.boot.gradle.tasks.bundling BootZipCopyAction CONSTANT_TIME_FOR_ZIP_ENTRIES
long CONSTANT_TIME_FOR_ZIP_ENTRIES
To view the source code for org.springframework.boot.gradle.tasks.bundling BootZipCopyAction CONSTANT_TIME_FOR_ZIP_ENTRIES.
Click Source Link
From source file:org.springframework.boot.gradle.tasks.bundling.AbstractBootArchiveTests.java
@Test public void fileTimestampPreservationCanBeDisabled() throws IOException { this.task.setMainClassName("com.example.Main"); this.task.setPreserveFileTimestamps(false); this.task.execute(); assertThat(this.task.getArchivePath()).exists(); try (JarFile jarFile = new JarFile(this.task.getArchivePath())) { Enumeration<JarEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); assertThat(entry.getTime()).isEqualTo(BootZipCopyAction.CONSTANT_TIME_FOR_ZIP_ENTRIES); }/*from w w w . j av a 2 s.c om*/ } }