ImageJ: Ticket #1086: Deploy snapshot versions of ImageJ2 artifacts only if their corresponding source code changedhttp://trac.imagej.net/ticket/1086
<p>
To avoid having to download unnecessary snapshot versions, let's only deploy when things actually changed.
</p>
<p>
Due to .jar files storing files' timestamps, we cannot simply check whether the .jar file changed.
</p>
<p>
There are basically two options I can think of how to handle things:
</p>
<p>
1) unpack both the old and the new .jar and md5sum the files, sort by name, compare the md5sums. But that means that we have to keep track somehow what was the previously deployed (old) .jar.
</p>
<p>
2) upon successful build, store the current commit SHA-1 in a file that is then published. In the build script of <a class="ext-link" href="http://jenkins.imagej.net/job/ImageJ-daily/configure"><span class="icon"> </span>http://jenkins.imagej.net/job/ImageJ-daily/configure</a> we then need to look for ../lastSuccessful/&lt;file&gt; and compare the output of "git rev-parse $SHA1:&lt;path-to-current-project&gt;" between the current HEAD and the one from the last successful build
</p>
<p>
In any case, to do this, we need to move the deploy target outside of the Maven build step and into the shell build step, and let the shell script traverse all sub-projects with deployable targets.
</p>
<p>
Hmm. Maybe there is a way to teach Maven's deploy to check the .jar contents' checksums instead and only deploy a new snapshot when they differ? Would be more general and less ugly...
</p>
en-usImageJhttp://developer.imagej.net/files/imagej/logo.pnghttp://trac.imagej.net/ticket/1086
Trac 0.12.2dschoMon, 16 Apr 2012 15:32:13 GMTmilestone changedhttp://trac.imagej.net/ticket/1086#comment:1
http://trac.imagej.net/ticket/1086#comment:1
<ul>
<li><strong>milestone</strong>
changed from <em>imagej-2.0-beta2</em> to <em>imagej-2.0-final</em>
</li>
</ul>
<p>
Just like <a class="closed ticket" href="http://trac.imagej.net/ticket/1085" title="defect: Build &amp; deploy the ImageJ Launcher only when the relevant source code ... (closed: fixed)">#1085</a>, this is not really critical for users. So pushing to -final, too.
</p>
TicketdschoWed, 03 Oct 2012 22:06:25 GMTstatus changed; resolution sethttp://trac.imagej.net/ticket/1086#comment:2
http://trac.imagej.net/ticket/1086#comment:2
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
</ul>
<p>
Since I had to do this for Fiji anyway (a couple of artifacts are *not* -SNAPSHOT versions, so we cannot simply <em>mvn deploy</em> blindly in the <em>Fiji-Maven</em> job), I activated this in the ImageJ job, too.
</p>
TicketdschoWed, 03 Oct 2012 22:30:06 GMThttp://trac.imagej.net/ticket/1086#comment:3
http://trac.imagej.net/ticket/1086#comment:3
<p>
To be precise, I replaced the <em>mvn deploy</em> step in the <em>ImageJ</em> job with <em>mvn package</em> and after that added a build step that simply calls Fiji's <em>incremental-deploy.sh</em>: <a class="ext-link" href="https://github.com/fiji/fiji/blob/34ec4f327e8bd48e755eae205f8433343d787b73/bin/incremental-deploy.sh"><span class="icon"> </span>https://github.com/fiji/fiji/blob/34ec4f327e8bd48e755eae205f8433343d787b73/bin/incremental-deploy.sh</a>
</p>
<p>
While at it, I also replaced the <em>mvn deploy</em> step in <em>ImageJ-daily</em> with <em>mvn package</em>, as there is now no more need for deploying once a day.
</p>
TicketbdezoniaMon, 15 Oct 2012 14:17:55 GMTmilestone changedhttp://trac.imagej.net/ticket/1086#comment:4
http://trac.imagej.net/ticket/1086#comment:4
<ul>
<li><strong>milestone</strong>
changed from <em>imagej-2.0.0</em> to <em>imagej-2.0.0-beta5</em>
</li>
</ul>
Ticket