Skip to content

Conversation

@simPod
Copy link
Contributor

@simPod simPod commented Dec 10, 2020

PropertiesFileTransformer uses java.utils.Properties internally as a storage.

java.utils.Properties store0() contains bw.write("#" + new Date().toString()); that prepends current timestamp before any content (after comments).

This effectively breaks reproducible builds that use PropertiesFileTransformer because every new build has different timestamp in transformed files.

CleanProperties implementation is introduced in order to remove prepended timestamp when creating output stream.

@johnrengelman johnrengelman added this to the 6.2 milestone Feb 21, 2021
@simPod simPod requested a review from johnrengelman February 25, 2021 15:41
@johnrengelman johnrengelman modified the milestones: 7.0, 8.0 Apr 26, 2021
@simPod
Copy link
Contributor Author

simPod commented Nov 6, 2021

@johnrengelman can I do anything to move this forward?

@grongor
Copy link

grongor commented Nov 26, 2021

@johnrengelman please, can we do anything to move this forward? We are deploying several java applications in one pipeline, and it would be really nice if we could skip the ones that didn't change. And we can't do that now since the hash of the jar always changes...

@crafton
Copy link

crafton commented Sep 14, 2022

@johnrengelman will this change be moving forward?

PropertiesFileTransformer uses `java.utils.Properties` internally as a storage.

`java.utils.Properties` `store0()` contains `bw.write("#" + new Date().toString());` that prepends current timestamp before any content (after comments).

 This effectively breaks reproducible builds that use PropertiesFileTransformer because every new build has different timestamp in transformed files.

 CleanProperties implementation is introduced in order to remove prepended timestamp when creating output stream.
@simPod
Copy link
Contributor Author

simPod commented Feb 15, 2023

Yet another rebase in few years. Fresh master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants