Closed greenwoodma closed 5 years ago
After more thought and discussion we've decided not to offer this as part of the API as under normal API conditions it wouldn't work anyway.
The default list of plugins is only downloaded by the GUI so the API on it's own won't know what the answer is. To get it to work it would have to download the list, and if it couldn't then if you were relying on the answer you would have to terminate. This would essentially mean, for example, you couldn't run GCP offline and have it check for a plugin version.
Also it would be a terrible idea from the point of reproducability to allow API code to silently switch plugin versions. In fact it completely negates the point of introducing versioning altogether.
We have a default list of plugins for each version of gate-core but no easy way via the API (other than manually iterating over all known plugins) to find which version of a plugin is being recommended.
I can see two possible ways of doing this:
CreoleRegister
where you can ask for the default version. This would allow us to handle all plugin types but would be a bit messy as you'd need to provide aPlugin
instance, and you would in turn have to specify a version.Plugin.Maven
that given the group and artifact would return the recommended version if the plugin was known