The Plugin Manager uses Plugin repositories to gather knowledge on the available plugins. The repositories can be provided in three formats:
The metadata used by the plugin is:
id : The unique id of the plugin. name : The name of the plugin. Defined in plugin.properties versions : A list of version. description (optional) helpUrl (optional) vendor (optional) mainClass (optional)
A version is composed of:
its version : The version number a downloadUrl : The url to download the plugin .jar. It can be a local path. depends : A list of other GroIMP plugin required to run the plugin. The plugins are designed by their id and a version number
libs : A list of external libraries required by the plugin. The list must contains the name of the jar used by groimp and an url (or local path) to fetch that jar.
Here is an example of a plugin.json file:
[ { "id" : "de.grogra.test", "name" : "Test", "description" : "This is a testing plugin", "helpUrl": "https://gitlab.com/grogra/groimp-plugins/", "vendor": "de.grogra", "mainClass": "", "versions" : { "1.2.3" : { "downloadUrl" : "https://gitlab.com/grogra/groimp-plugins/Test/download", "libs" : { "xmlbeans.jar" :"https://repo1.maven.org/maven2/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar" }, "depends" : { "de.grogra.ext.x3d":"=2.1.1" } } } } ]
The plugin usually depends on other groimp plugins. It can however depends on a specific version of a plugin. That dependency is defined by the = before the version number:
"depends" : { "de.grogra.ext.x3d":"=2.1.1" }
By default the plugin manager uses the “Higher than condition”. It means that if a plugin depends on another, as long a a version newer of that plugin is available, the condition is met.