[jbosstools-issues] [JBoss JIRA] (JBIDE-13671) Replace build timestamp in qualifier by last-mod-timestamp from git

Nick Boldt (JIRA) issues at jboss.org
Fri Apr 29 14:25:00 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-13671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199270#comment-13199270 ] 

Nick Boldt commented on JBIDE-13671:
------------------------------------

Found a better implementation:

https://github.com/jbosstools/jbosstools-build/pull/217

For a dirty git workspace local build (changing the local arquillian feature.xml & having an extra untracked file in there), I get:

{code}
org.jboss.tools.arquillian.feature_1.2.100.Alpha1-v20160429-1802-LOCAL.jar  (local timestamp, not jgit)

org.jboss.tools.arquillian.ui_1.2.100.Alpha1-v20160211-2142-LOCAL.jar (remote jgit timestamp, unchanged except the -LOCAL suffix)

$➔ cat site/target/repository/index.html | grep 1.2.100
<title>JBoss Tools - arquillian.site - &shy; Update Site: 1.2.100-SNAPSHOT (Alpha1-v20160429-1802-LOCAL)</title>  (local timestamp, not jgit)
{code}

If I commit the change and remove the untracked files so we're clean locally:

{code}
org.jboss.tools.arquillian.feature_1.2.100.Alpha1-v20160429-1811-LOCAL.jar  (local jgit timestamp)

org.jboss.tools.arquillian.ui_1.2.100.Alpha1-v20160211-2142-LOCAL.jar (remote jgit timestamp, unchanged except the -LOCAL suffix)

<title>JBoss Tools - arquillian.site - &shy; Update Site: 1.2.100-SNAPSHOT (Alpha1-v20160429-1811-LOCAL)</title>  (local jgit timestamp)
{code}

If I remove the change and all untracked files:

{code}
org.jboss.tools.arquillian.feature_1.2.100.Alpha1-v20160211-2142-LOCAL.jar (remote jgit timestamp, unchanged except the -LOCAL suffix)

org.jboss.tools.arquillian.ui_1.2.100.Alpha1-v20160211-2142-LOCAL.jar (remote jgit timestamp, unchanged except the -LOCAL suffix)

<title>JBoss Tools - arquillian.site - &shy; Update Site: 1.2.100-SNAPSHOT (Alpha1-v20160211-2142-LOCAL)</title>  (remote jgit timestamp, unchanged except the -LOCAL suffix)
{code}

If I rebuild the last Jenkins build locally:
{code}
org.jboss.tools.arquillian.feature_1.2.100.Alpha1-v20160211-2142-ci.jar  (remote jgit timestamp, unchanged except the -ci suffix)

org.jboss.tools.arquillian.ui_1.2.100.Alpha1-v20160211-2142-ci.jar  (remote jgit timestamp, unchanged except the -ci suffix)

<title>JBoss Tools - arquillian.site - &shy; Update Site: 1.2.100-SNAPSHOT (Alpha1-v20160211-2142-ci)</title>  (remote jgit timestamp, unchanged except the -ci suffix)
{code}

Why use 'LOCAL' and 'ci'? That way just in case there are two builds done at the exact same time, one in Jenkins and one locally, the Jenkins one will always be considered NEWER (lowercase letters are of higher priority in the ASCII table than uppercase ones, which is how OSGi determines which is newer).



> Replace build timestamp in qualifier by last-mod-timestamp from git
> -------------------------------------------------------------------
>
>                 Key: JBIDE-13671
>                 URL: https://issues.jboss.org/browse/JBIDE-13671
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: build
>    Affects Versions: 4.1.0.Alpha1
>            Reporter: Nick Boldt
>            Assignee: Nick Boldt
>            Priority: Optional
>             Fix For: 4.4.0.Alpha2
>
>         Attachments: jbide13671-before-and-after.png
>
>
> This needs to be added to master parent pom:
> {code}
>        <plugin>
>           <groupId>org.eclipse.tycho</groupId>
>           <artifactId>tycho-packaging-plugin</artifactId>
>           <version>${tycho.version}</version>
>           <dependencies>
>             <dependency>
>               <groupId>org.eclipse.tycho.extras</groupId>
>               <artifactId>tycho-buildtimestamp-jgit</artifactId>
>               <version>${tycho-extras.version}</version>
>             </dependency>
>           </dependencies>
>           <configuration>
>             <strictBinIncludes>false</strictBinIncludes>
>             <format>'v'yyyyMMdd-HHmm</format>
>             <timestampProvider>jgit</timestampProvider>
>             <jgit.ignore>
>             </jgit.ignore>
>           </configuration>
>         </plugin>
> {code}
> Ref: http://pweclipse.blogspot.ch/2012_09_01_archive.html



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jbosstools-issues mailing list