Skip to content

Commit b0414e8

Browse files
committed
Make quarkus-ide-launcher jar reproducible
By adding an output timestamp, we can get it to be binary identical when the content is identical. Obviously, the date needs to be forged to be consistent between two separate builds and the output to be cachable.
1 parent 0a8efce commit b0414e8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

core/launcher/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
<groupId>org.apache.maven.plugins</groupId>
9393
<artifactId>maven-jar-plugin</artifactId>
9494
<configuration>
95+
<outputTimestamp>2023-10-17T10:15:30Z</outputTimestamp>
9596
<excludes>
9697
<exclude>**/LauncherShader.class</exclude>
9798
</excludes>

core/launcher/src/main/java/io/quarkus/launcher/LauncherShader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.io.BufferedWriter;
44
import java.nio.file.Files;
55
import java.nio.file.Path;
6+
import java.nio.file.StandardCopyOption;
67
import java.util.stream.Stream;
78

89
/**
@@ -56,7 +57,7 @@ public static void main(String[] args) throws Exception {
5657
continue;
5758
}
5859
Files.createDirectories(destPath.getParent());
59-
Files.copy(p, destPath);
60+
Files.copy(p, destPath, StandardCopyOption.COPY_ATTRIBUTES);
6061
}
6162
}
6263
}

0 commit comments

Comments
 (0)