Skip to content
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 causes JAR hash change #9

Closed
wwadge opened this issue Mar 4, 2016 · 7 comments
Closed

Timestamp causes JAR hash change #9

wwadge opened this issue Mar 4, 2016 · 7 comments

Comments

@wwadge
Copy link

wwadge commented Mar 4, 2016

#Fri Mar 04 14:27:29 CET 2016
git.commit.id=8ce443f105008d621430efe33f59816a77c428d8
git.commit.time=1457050640
....

The timestamp comment written to file causes gradle to think the resultant JAR file has changed even if nothing else has (and also causes issues with docker since it thinks the whole artifact has been modified). Can you suppress it?

@n0mer
Copy link
Owner

n0mer commented Mar 14, 2016

@wwadge did you try keys option from #3 ? Did it help to eliminate 'time' ?

@tha2015
Copy link
Collaborator

tha2015 commented Mar 14, 2016

I think the ticket is about the comment "#Fri Mar 04 14:27:29 CET 2016", not about the key "git.commit.time=1457050640".

@wwadge
Copy link
Author

wwadge commented Mar 14, 2016

That's correct @tha2015 -- keys option wouldn't do anything here.

@tha2015
Copy link
Collaborator

tha2015 commented Mar 15, 2016

One thing I don't understand here is why the plugin is re-creating the git.properties while the input files and output files are not changed? Normally gradle will just show "UP-TO-DATE" and skip the step (assuming that the plugin is implemented correctly to support up-to-date check)

@wwadge
Copy link
Author

wwadge commented Mar 15, 2016

Even if that is not not an issue, it doesn't hit my use case -- I am rebuilding each time from a jenkins clean slate but each time I build my docker images, docker will think they are new because of this timestamp which serves no purpose at all.

n0mer added a commit that referenced this issue Mar 16, 2016
n0mer added a commit that referenced this issue Mar 16, 2016
bump version for #9
n0mer added a commit that referenced this issue Mar 16, 2016
@n0mer n0mer closed this as completed in 16f1a2b Mar 16, 2016
@n0mer
Copy link
Owner

n0mer commented Mar 16, 2016

@wwadge please check 1.4.14 version and get back whether this fixes your issue or not

@wwadge
Copy link
Author

wwadge commented Mar 16, 2016

Works fine - thanks!

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

No branches or pull requests

3 participants