Distribute a fork of plugin as a jar.

23 views
Skip to first unread message

Jean-Yves Tinevez

unread,
Sep 6, 2016, 4:10:18 AM9/6/16
to Icy imaging
Dear Icy people,

For a project still in exploration phase, I forked an existing plugin shipped with Icy [1].
It is a bit early to release it as a separate repository.

But how to distribute it to the end users?

I tried to put the code in a fat-jar then put the jar in the original plugin location. 
However, as I launch Icy, it gets replaced by the original plugin, downloaded as an update.

How would you do this?



Stephane

unread,
Sep 12, 2016, 6:03:57 AM9/12/16
to Icy imaging
Dear Jean-Yves,

It depends if you want to distribute it publicly or privately.
For a public plugin distribution you can just register on Icy website then upload a new plugin from your account, then any Icy user will be able to see / install / update it directly from the application.
For a private distribution you can build a private repository (there is a plugin which help you to do that), eventually protected by a password. But if you want a simpler manner (give jar file to users) then you can indeed pack the whole inside a jar file and put it in the "plugins" folder of Icy.

Speaking about your specific case now : if you forked an existing plugin, then your plugin will have the same "class name" as the plugin you forked and Icy won't be able to distinguish them. When it will load your plugin, it will recognize it as the original plugin but not correctly installed and will update it to fix it. To avoid that, you have to change the class name of your fork (can be just the package name or the complete class name) so Icy will recognize it a different plugin.
If you really want to override the original plugin (for some reason) then be sure to replace the original plugin jar file (in the correct sub folder) then disable automatic plugin update otherwise it will be replaced at the next update.
You're welcome to come if you need more information about it :)

Best,

- Stephane
Reply all
Reply to author
Forward
0 new messages