Hi all, this is Chris from Open Imaging (a.k.a. the new caretakers of the Micro-Manager project). We’re making use of the SciJavaPlugin and @Plugin annotations to handle our plugin loading, which is great. We are, I admit, manually scanning jars and loading plugins based on the JSON we find there rather than using the plugin service (mostly because I don’t want to add the plugin jars to the classpath). This is still much cleaner and orders of magnitude faster than our old plugin loading system.
I do have a concern, though. We’d like our plugins to be able to have multiple annotated classes in the same jar. For example, if a given plugin jar exposes both a data-processing plugin to add metadata to the image, and an overlay plugin to draw on the image based on the metadata, those are two separate classes that both need an @Plugin annotation. Currently, something like that results in entries in the META-INF that look like this:
This is not valid JSON – there’s two separate dictionaries, and they aren’t contained in a list, just sort of crammed next to each other. Consequently, we can’t correctly parse this kind of META-INF file. and find all of the classes that we should know about.
Would it be possible to get the annotation logic to generate a valid JSON metadata in the event that the jar contains multiple annotated classes? Ideally it would contain a list of dictionaries.
Thanks for your time!