Updater: How to resolve conflicts in Travis CI build?

I’m trying to deploy the plugins from the Neuroanatomy update site automatically using Travis CI.

I thought everything was working, but there seems to be a problem: The updater halts the upload because it is waiting for input on how to resolve a conflict:

[INFO] Uploading to Neuroanatomy (webdav:Neuroanatomy:<password>:./)
File 'jars/ij-1.51n.jar':
Is locally modified but a dependency of
  1 Do not upload jars/ij-1.51n.jar
  2 Upload jars/ij-1.51n.jar
  3 Break the dependency

Did any of you come across a similar issue? Why does the conflict happens in the first place? I’m using the latest pom-scijava 14.0.0 (declaring ij-1.51h.jar), so I actually don’t get how ij-1.51n.jar is brought in.
I guess another way to solve this is to pass a resolution option to the .travis-deploy.sh script. Any suggestions on that?

On a related note: I’ve set the deploy script so that only releases (non-SNAPSHOT) versions would be uploaded:

I’m not sure this is the best way to do so. Any suggestions?

1 Like

@ctrueden, @hadim any thoughts?

I see you are using a script very similar to the one I use.

And I saw the same issue as yours.

My hypothesis is that the Fiji we download during the build is sometime outdated and so the $IJ_LAUNCHER --update upload command find conflicts in other files than the one you want to update.

I didn’t find a way to solve this.

@ctrueden might have an idea of what is going on and how to solve it.

It has been a long time since I’ve done this stuff… but see here for how I was doing it (until recently) for the Bio-Formats update site.

The gist is that you want to do a --update update-force-pristine before running the --update upload-complete-site --force-shadow "$UPDATE_SITE_NAME".

1 Like

@tferr can you let me know here if @ctrueden script is working for you ? Thanks.

@hadim, Well, not really

–update update-force-pristine solved the conflicts: The script exits successffully but the jar file to be uploaded got tagged for removal (log).

I’ve then committed @ctrueden exact upload instructions, but the file is still tagged for removal (log). Any thoughts?

(meanwhile I’ve uploaded the jar manually)

EDIT: Sorry, I just realize that I am now uploading to the /jars directory, not /plugins… that could be the problem… I’ll looking into it now.

@tferr You need to do the update-force-pristine before installing your JAR into the installation, but not after. I see you that are actually doing that operation twice: once immediately after unpacking the application, and then a second time just before upload. Try removing the latter.

I’ve removed the duplication, it remains problematic. If I do:

$IJ_LAUNCHER --update upload-complete-site --force-shadow "$UPDATE_SITE"

Then some dependencies ij-1.51n.jar and Simple_Neurite_Tracer-3.1.1.jar get uploaded. Again, the pom-scijava 14.0.0. I’m using declares ij-1.51h.jar and Simple_Neurite_Tracer-3.1.0.jar so I’m not sure, where these come from.

If instead I do:

$IJ_LAUNCHER --update upload --update-site $UPDATE_SITE --force-shadow plugins/hIPNAT_.jar

the problem explained in my first post remains.
For now I will upload things manually. I’ll add a --simulate to the script to monitor things with a new pom-scijava release or as I change things… Every time I attempt an upload I fear I am screwing up the installation of subscribers of the update site…

I filed an issue which describes a way we could improve the situation in the future:

Your master branch actually resolves to neither of those:

$ mvn dependency:list | grep '\(:ij:\|Simple_Neurite_Tracer\)'
[INFO]    sc.fiji:Simple_Neurite_Tracer:jar:3.1.3-SNAPSHOT:compile
[INFO]    net.imagej:ij:jar:1.51h:compile

Note that ij-1.51n.jar and Simple_Neurite_Tracer-3.1.1.jar are what’s currently on the Java-8 update site. The update-force-pristine pulls them down into your installation. What I don’t understand immediately is why the delete.other.versions=true does not cause them to be overwritten by your older versions above.

Sorry I don’t have time to dig more deeply into this right now.


Thanks for looking into it and identifying the delete.other.versions=true being ignored. I’ll post here if I find anything else.

Quick question for you @tferr: Do you actually need to copy in additional dependencies? Looking at your dependencies, they all already ship with Fiji. So… would it be enough to just build your component and copy only target/hIPNAT_-*.jar directly into your ImageJ installation’s plugins folder? Then upload just that JAR? After all, you don’t really want to ship downgraded shadowed versions of things, do you?