Package io.quarkus.cli.plugin
Class PluginManager
java.lang.Object
io.quarkus.cli.plugin.PluginManager
-
Method Summary
Modifier and TypeMethodDescriptionAdds thePluginwith the specified name or location to the installed plugins.Adds thePluginwith the specified name or location to the installed plugins.Adds thePluginwith the specified name or location to the installed plugins.Adds thePluginwith the specified name or location to the installed plugins.static PluginManagercreate(PluginManagerSettings settings, io.quarkus.devtools.messagewriter.MessageWriter output, Optional<Path> userHome, Optional<Path> currentDir, Supplier<QuarkusProject> quarkusProject) static PluginManagerget()getInstalledPlugins(boolean userCatalog) getUtil()booleanCheck that the installed plugins are still available in the environment.removePlugin(Plugin plugin) Removes aPluginby name.removePlugin(Plugin plugin, boolean userCatalog) Removes aPluginby name.removePlugin(String name) Removes aPluginby name.removePlugin(String name, boolean userCatalog) Removes aPluginby name.booleansync()Remove unavailable plugins, add extension plugins if available.booleanOptionally sync if needed.
-
Method Details
-
get
-
create
public static PluginManager create(PluginManagerSettings settings, io.quarkus.devtools.messagewriter.MessageWriter output, Optional<Path> userHome, Optional<Path> currentDir, Supplier<QuarkusProject> quarkusProject) -
addPlugin
Adds thePluginwith the specified name or location to the installed plugins. Plugins that have been detected as installable may be added by name. Remote plugins, that are not detected can be added by the location (e.g. url or maven coordinates).- Parameters:
nameOrLocation- The name or location of the plugin.- Returns:
- the pugin that was added wrapped in
Optional, or empty if no plugin was added.
-
addPlugin
public Optional<Plugin> addPlugin(String nameOrLocation, boolean userCatalog, Optional<String> description) Adds thePluginwith the specified name or location to the installed plugins. Plugins that have been detected as installable may be added by name. Remote plugins, that are not detected can be added by the location (e.g. url or maven coordinates).- Parameters:
nameOrLocation- The name or location of the plugin.userCatalog- Flag to only use the user catalog.description- An optional description to add to the plugin.- Returns:
- The pugin that was added wrapped in
Optional, or empty if no plugin was added.
-
addPlugin
Adds thePluginwith the specified name or location to the installed plugins. Plugins that have been detected as installable may be added by name. Remote plugins, that are not detected can be added by the location (e.g. url or maven coordinates).- Parameters:
plugin- The plugin.- Returns:
- The pugin that was added wrapped in
Optional, or empty if no plugin was added.
-
addPlugin
Adds thePluginwith the specified name or location to the installed plugins. Plugins that have been detected as installable may be added by name. Remote plugins, that are not detected can be added by the location (e.g. url or maven coordinates).- Parameters:
plugin- The plugin.userCatalog- Flag to only use the user catalog.- Returns:
- The pugin that was added wrapped in
Optional, or empty if no plugin was added.
-
removePlugin
Removes aPluginby name. The catalog from which the plugin will be removed is selected based on where the plugin is found. If plugin is found in both catalogs the project catalog is preferred.- Parameters:
name- The name of the plugin to remove.- Returns:
- The removed plugin wrapped in Optional, empty if no plugin was removed.
-
removePlugin
Removes aPluginby name. The catalog from which the plugin will be removed is selected based on where the plugin is found. If plugin is found in both catalogs the project catalog is preferred.- Parameters:
name- The name of the plugin to remove.userCatalog- Flag to only use the user catalog.- Returns:
- The removed plugin wrapped in Optional, empty if no plugin was removed.
-
removePlugin
Removes aPluginby name. The catalog from which the plugin will be removed is selected based on where the plugin is found. If plugin is found in both catalogs the project catalog is preferred.- Parameters:
plugin- The plugin to remove- Returns:
- The removed plugin wrapped in Optional, empty if no plugin was removed.
-
removePlugin
Removes aPluginby name. The catalog from which the plugin will be removed is selected based on where the plugin is found. If plugin is found in both catalogs the project catalog is preferred.- Parameters:
plugin- The plugin to removeuserCatalog- Flag to only use the user catalog.- Returns:
- The removed plugin wrapped in Optional, empty if no plugin was removed.
-
reconcile
public boolean reconcile()Check that the installed plugins are still available in the environment.- Returns:
- true if any catalog was changed.
-
sync
public boolean sync()Remove unavailable plugins, add extension plugins if available.- Returns:
- true if changes any catalog was modified.
-
syncIfNeeded
public boolean syncIfNeeded()Optionally sync if needed. Sync happens weekly or when project files are updated. -
getInstalledPlugins
-
getInstalledPlugins
-
getInstallablePlugins
-
getUtil
-