Closed clausnagel closed 8 months ago
Nice module. Only one comment: should we create an empty plugin
folder in the CLI tool build package?
Nice module. Only one comment: should we create an empty
plugin
folder in the CLI tool build package?
Yes, absolutely!
added empty plugins directory with 1c39dc09112e4ff5a972905ce67e067eb7d4a72d
This PR adds support for user-defined plugins to citydb-tool.
The plugin mechanism is defined in the new module
citydb-plugin
:org.citydb.plugin.Plugin
.org.citydb.plugin.Extension
.PluginManager
takes care of dynamically loading plugins at runtime and provides access to all loaded plugins, extensions, and theClassLoader
used for loading the plugins.Besides this general plugin mechanism, the
citydb-cli
module has been extended by this PR:citydb-cli
using thePluginManager
. Plugins are recursively searched for in theplugins
directory (default) or in any other directory defined by the new--plugins
parameter.--use-plugins
parameter.citydb-cli
module defines three extensions that allow extending the citydb-tool CLI:MainCommand
adds a new main command to the CLI.ImportFormatCommand
adds a new subcommand to theimport
command to add support for another data format.ExportFormatCommand
adds a new subcommand to theexport
command to add support for another data format.More extensions to other modules will be added after merging this PR. Note: All user-defined extensions to citydb-tool will be plugins. There is no distinction between plugins and ADE extensions like in the Importer/Exporter anymore.