Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] jgit timestamp provider ignores local changes

Hi Mickael,

> For our project, I gave a try to
> http://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers . It's
> working well, but in the case a local change happen on the module, the
> timestamp provider doesn't detect it and still uses timestamp of the
> latest commit. So in the end, we can have several different artifacts
> (with different content) using the same fully-qualified versions, built
> on the same machine. This seems to me totally dangerous since we expect
> OSGi bundles with same qualifiers to contain the same thing. Here we
> cannot rely any more on qualified version to compare bundles.
> This is pretty common use-case that running a "mvn verify" before a
> commit and then generating multiple artifacts with same version and
> different content, so it's not a corner-case.
> Ideally, I would have expected the git timestamp provider to set the
> timestamp to the current build timestamp in case it detects a local
> change. What would you think of this behaviour? Should I open a feature
> request?

you may be able to build a workaround/sanity check using
buildnumber:create and enforcer:enforce with the requireProperty rule.
AFAIK the changeset ID produced by buildnumber:create has a '+' suffix
if there are any uncommitted changes -- at least, it does for "scm:hg: URLs.

(That being said, using both the buildnumber-maven-plugin and the jgit
timestamp provider feels kind of redundant to me.)

Hope this helps,

Andreas
-- 
Codetrails.com - the knowledge transfer company


Back to the top