Depending on older versions of Fiji plugins

The WormSizer plugin has been broken since recent updates. I tracked it down to a change in the AnalyzeSkeleton plugin. I’d prefer to simply have WormSizer depend on the most recent version of the plugin that it worked with (i.e. 2.0.5) and be done with it.

I changed the plugin’s POM to:
<dependency> <groupId>sc.fiji</groupId> <artifactId>AnalyzeSkeleton_</artifactId> <!-- 3.0 and greater break WormSizer --> <version>2.0.5</version> </dependency>

When I build the plugin locally and using the "Install to Fiji’ Maven action, everything works great. When I try to upload the new version of Wormsizer (with the update POM) to my update site, it works, but it says my AnalyzeSkeleton_.jar is locally modified. When I uninstall WormSizer and grab it from the update site, it doesn’t work anymore (it uses the newer version of the AnalyzeSkeleton_ plugin).

So, can I have a dependency on a specific version (other than current) on another Fiji plugin? If so, what am I not doing right?

To do that, you would need to “shadow” your needed version of the AnalyzeSkeleton_ JAR file—i.e., upload it to your update site, forcing it to take precedence over the one normally shipped with Fiji. You can do that, but then anyone who enables your update site will receive the old AnalyzeSkeleton_ plugin instead of the latest.

Better is to fix WormSizer to work with the current AnalyzeSkeleton_, so that users do not have to choose. In this case, it should be very easy, since IIRC the only breaking change to that plugin was a package prefix rename.

There are technologies which allow shipping multiple versions of plugins with a single Java application (e.g., OSGi), but they add lots of complexity. We would greatly prefer not to use them with ImageJ2, because it would make the deployment situation even more complex and error-prone than it already is.

Please also see the discussion in this pull request (which was opened before the package name change in AnalyzeSkeleton):

I submitted a new PR updating to the latest pom-fiji and renaming the package names accordingly:

1 Like

Could someone confirm the version of Skeletonize3D_ that is currently deployed? The ver21.0 Fiji pom has the version as 2.0.0. I just reinstalled Fiji and updated: AnalyzeSkeleton is at 3.0.0 but Skeletonize3D is at 1.0.2 (this is me looking at the downloaded .jar files).

@bradtmoore That’s correct, I also see AnalyzeSkeleton-3.0.0 and Skeletonize3D-1.0.2 served from the Fiji update site.

I guess Skeletonize3D-2.0.0 would need to be served via the Java-8 update site then (but currently isn’t yet)?

Maybe @ctrueden or @hinerm can comment on that?

It looks like Mark bumped pom-fiji to define Skeletonize3D at version 2.0.0, then released pom-fiji version 21.0.0. But as of this writing, Fiji itself is not yet updated to use that 21.0.0 release. We keep Fiji and Java-8 update sites in sync with what’s on the fiji master branch. So we haven’t uploaded the Skeletonize3D version 2.0.0 to either update site yet. But we will do so soon.