A perennial question of script developers has been: can I distribute my scripts inside a JAR file? For a long time, there was no solution. More recently, there is fiji/Script_Launcher, which provides a hacky way to write an ImageJ 1.x
plugins.config that launches scripts embedded in the same JAR file.
However, the right way to do this is really for SciJava Common to take care of discovering scripts within JAR files for you. There was already code that essentially did it, in the form of the Script Editor’s
script_templates. I have now adapted and generalized that code so that scripts within the
scripts directory of each classpath element (including JAR files) get discovered automatically. With this scheme, we no longer need the ImageJ-1.x-specific
plugins.config files, but instead everything is handled natively by the SJC discovery mechanism.
The relevant commit is scijava/scijava-common@0fa97cde8. If you want to try out the code, you can download the latest
2.57.0-SNAPSHOT. I have not substantially tested it yet, although there are passing unit tests exercising the feature.