-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timestamp in classes inside 2.14.0 jar showing 02/01/1980 #3680
Comments
I don't know. It could perhaps be related to "Reproducible Builds" changes since use of constant timestamp for classes would remove one source of non-meaningful differences in jars. This was done for Jackson 2.14. Is there a specific problem here or just general curiosity? |
Yes, I think this is related to Reproducible Builds, but something seems wrong: only META-INF entries have expected timestamp. Classes do not... |
Just general curiosity |
@hboutemy See ^^^ -- I suspect that for purposes of RB this works, but it is awkward that class file timestamps are in distant past. Do you know what might be causing it, or, more importantly, how to fix it? |
Looks like this might be same as open-telemetry/opentelemetry-java-instrumentation#2517 but I don't see a resolution there... |
for Jackson Databind, the For Open Telemetry, they use Gradle for their build: in Gradle, the use of this fixed timestamp from the past is a design decision: they don't configure the timestamp par project, but just force this fixed arbitrary value I think that both cases are related, because Bnd is built with Gradle, then I suppose (I may be wrong) the author designed his Reproducible Builds feature for Bnd output the way Gradle designed it... |
Thank you @hboutemy -- was about to suggest it might be bundle plugin as that'd be likely difference. I hope it is resolvable, although fundamentally value chosen only needs to be stable and not necessarily useful. We seem to be using the latest https://mvnrepository.com/artifact/org.apache.felix/maven-bundle-plugin so I guess this is the current behavior. EDIT: This bndtools/bnd#3521 issue seems quite relevant. As well as: https://github.com/bndtools/bnd/tree/master/maven/bnd-maven-plugin#reproducible-builds Maybe we just need to add:
somehow... defaults are actually set in |
no, you don't need to add anything: as written to the doc you pointed to, it's done automatically by bnd-maven-plugin when outputTimestamp is defined. Notice that your build does not use bnd-maven-plugin same is done by Maven Bundle Plugin, see apache/felix-dev@957e5c9 I suppose that creating a sample project using bnd-maven-plugin and improving bnd-maven-plugin to get the desired result looks like a good idea, because it will be easier for Bnd maintainer: once everything works as expected with bnd-maven-plugin, Felix's maven-bundle-plugin can mimic the same updates (notice: don't ask me why 2 plugins exist, I'm definitively not an OSGi expert...) |
@hboutemy Ah. So it's "the other" OSGi bundle plug-in. That explains why configuration settings seemed different. Unfortunately my knowledge of OSGi bundle building is very limited: the whole setup was a contribution. But maybe someone else with more knowledge can help. I guess conversion from one bundle plugin (Felix) to the other ( |
@hboutemy Just to make sure I understand state of things: it sounds like neither Felix |
@cowtowncoder thanks for sharing the migration article: I'm learning very interesting things about these 2 plugins, I'm starting to understand the story behind which leads to an answer on "it sounds like neither Felix maven-bundle-plugin nor biz.aQute.bnd:bnd-maven-plugin automatically handle things the way we'd want, wrt specified timestamp. good news: not exactly, the situation is better: the Felix So the quick summary is: if you migrate Jackson to (I learned many things these days, thanks a lot) |
@hboutemy Ah. Interesting! So at least there is a way forward. I'll need to figure out who could help with migration; mostly wrt verifying that resulting OSGi bundle works as well or better after change -- this also would need to be done for all dozen of repos or so. But the first one would no doubt be most work and should be able to use same procedure for others. |
@cowtowncoder I worked on it: in fact, we can avoid the full |
Excellent, thank you @hboutemy ! |
Any idea why the classes inside version 2.14 are showing 02/01/1980??
The text was updated successfully, but these errors were encountered: