Table of Contents

Plugin repositories

The Plugin Manager uses Plugin repositories to gather knowledge on the available plugins. The repositories can be provided in three formats:

  1. Ordered List ItemAs a JSON file. Which contains the metadata of one or several plugins.The file need to follow the JSON format for plugin data (see bellow).
  2. Ordered List ItemAs a local directory. The directory is automatically scanned to find any Groimp plugin. They are found from their plugin.xml file. The plugin data is then extracted from that file.
  3. Ordered List ItemAs a list of repositories (.list). The .list file is a simple list of any of the three repository formats.

JSON format for plugin data

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"
                }
            }
        }
    }
]

Plugin version conditions

Equal condition

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"
}

Higher than condition

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.