Upload site for plugin-downloadable jar


#1

I have created an upload site for a plugin developed by our group. This plugin uses the POI apache jars. Is there a way to link to the current version of downloadable POI apache jar folder page when somebody installs the plugin from our group, without providing the direct downloadable apache poi jars by us. Kindly let me know.


#2

Hi @jagadish

could you please explain a bit more what you want to do? The usual way of using update sites is 1) the developer uploads a new version of a jar file and afterwards, 2) all users can download the most recent version from this update site. How would you like to change this default strategy?

Cheers,
Robert


#3

Hi @haesleinhuepf

Our group has developed a plugin and we have an update site for it. If there is a new version, we will upload the jar file and later the users can update their plugins.

Let us say, if anyone wants a copy of our plugin, they will add our update site to the Update manger. The plugin will be downloaded and updated in their ImageJ. The plugin from our group also needs the POI apache jar folder. Is it possible to link the update page to the downloads of the apache jar folder and automatically copy the apache jar folder to the jars folder for the interested user? In other words, we want to provide the plugin and only a link to downloadable apache jar folders. Is this possible?


#4

A related question. In case, it is not possible to link to the downloadable apache folders directly, does ImageJ update site allow one to upload an entire jar folder (instead of individual files) to the update site? I am asking this because, apache jars is a folder and not just a collection of jar files


#5

There is no option to link to external sources of jar files within an update site. Doing this would be error prone, as your code might depend on a specific version of a jar file and might break if the user gets a newer, incompatible version.

The solution for this is a proper dependency management:
@jagadish if you use Maven to build your plugin, the dependencies of your plugin will be known to the updater, and it will prompt you to also upload the required dependency jar files when you upload your plugin to your update site. Have a look at the example-imagej-command (and/or example-legacy-plugin) projects to see how dependencies are defined in a pom.xml file.

If you post a link to your source code (preferably on github), someone here on the forum will be able to help you mavenizing your project.


#6

Are you talking about the Imaging FCS plugin?


#7

Just like @imagejan suggested, would it be possible to distribute the apache POI jar files as well? Your users might be very happy if everything just runs by adding an update site and not additional installation steps are needed. :wink: According to their license, it should be possible to redistribute their stuff:
https://www.apache.org/licenses/LICENSE-2.0


#8

@imagejan: Yes, it is the Imaging FCS plugin.
@haesleinhuepf: Yes, that is what we are currently planning to do. I was just curious to know if there was an option to link to external sources of jar files within an update site. That’s why I posted here.


#9

Yeah, as @imagejan pointed out already, that isn’t possible. I guess it’s also for security reasons.

Cheers,
Robert


#10

Could you comment on my related question I posted.

Does ImageJ update site allow one to upload an entire jar folder (instead of individual files) to the update site? I am asking this because, apache jars is a folder and not just a collection of jar files?

When I use the “advanced” option in “manage update sites”, I am shown only a list of jar files which could be uploaded. Instead I need to load an entire folder.


#11

Hi @jagadish

I’m afraid, there is no folder upload option. Is it many files? Do they change often?

Cheers,
Robert


#12

I have created an upload site. If I use the upload site to install in a PC without the plugin by checking the “manage update sites”, the plugin gets downloaded and starts working.

  1. But, in an ImageJ installation with the plugin already present, as a test, I delete certain files the plugin needs and then run the “update” option, I get “Your ImageJ is upto date!” I expected it to identify the deleted files. If I go to the advanced mode and choose “View files of the pluginsite”, then click on “Easy mode”, it identifies the deleted files correctly as “Not installed” and I need to manually choose “install it” -> Apply changes to download and install them.
  2. Also, if I uncheck my update site in “manage update site” and then check again, it identifies the deleted files and installs them.
    Is there a way to do this automatically? Whenever any changes are made to the plugin files, the updater should identify the changes and update it.
    Thanks in advance!

#13

Which one is it? I looked at http://sites.imagej.net/ImagingFCS/, but couldn’t see any plugin files…

If you manually deleted the files, the updater might consider them uninstalled as intended, and not offer them automatically for installation. If you provide the full information about which update site you’re using, trouble-shooting might be easier.

That is how it currently works: if you upload a new version of the same file, all installations subscribed to your update site will be offered the new version on the next run of the updater.


#14

@imagejan:
Yes, it is the update site. The plugin is located inside this folder.
http://sites.imagej.net/ImagingFCS/plugins/
Thanks for the info; “If you manually deleted the files, the updater might consider them uninstalled as intended, and not offer them automatically for installation”. That explains it.


#15

A related question.

I have just created the update site. The name of the plugin has the version number in it. On Fiji apps which already have an older version of the plugin installed, if I run the “Manage updates”, a new plugin gets installed from the update site with the older one still remaining as well. We would like to avoid this. In case, we upload a newer version in the update site, how do we make sure it will overwrite the current version? Is the version number in the file name a hindrance to this?