Skip to content

Commit a9d2aee

Browse files
committed
Use reproducible time stamps for Maven build artifacts
Unfortunately, JAR files store time stamps of the files inside them. These time stamps depend on the build time of these files hence breaking bit for bit reproducibility. By setting all time stamps to a predefined value and removing superfluous build artifacts this issue can be avoided. Conventionally, UNIX time stamp 1 signifies an intentionally set time stamp (in contrast to UNIX time stamp 0) which has no meaning and is easy to recognize.
1 parent afc51d1 commit a9d2aee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1414
<maven.compiler.source>17</maven.compiler.source>
1515
<maven.compiler.target>17</maven.compiler.target>
16+
<!-- Override the time stamps of build artifacts to ensure reproducibility -->
17+
<project.build.outputTimestamp>1</project.build.outputTimestamp>
1618
</properties>
1719

1820
<build>

0 commit comments

Comments
 (0)