Open timja opened 8 years ago
when a plugin is installed
Makes sense; roughly similar to ExtensionList change events.
uninstalled
Makes less sense, as there's no runtime unloading of plugins, and plugins can always 'uninstalled' by deleting their HPI file while Jenkins is down. Implementing this will likely lead to misery because whoever uses the notification to do something clever will not consider this.
I see. So removal of a plugin does not change runtime functionality of that plugin unless Jenkins is restarted? That is uninstall of a plugin is not complete till restart?
In case a plugin's HPI is removed when jenkins is down should be ok as during boot process a plugin interested in funding installed plugins will get a new list from pluginManager.getPlugins().
Some plugin might like to do interesting things with plugin lifecycle, when a plugin is installed or uninstalled.
There is InitReactorListener interface but it gets loaded way early during boot time and the InitReactorListener implementations inside plugins never get loaded to receive post-boot plugin lifecycle events.
Originally reported by vivek, imported from: Hooks to get plugin lifecycle events