DependencyTrack / DependencyTrack/dependency-track
Extend `PluginManager` to support loading of plugins from JARs
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior
`PluginManager` can currently only discover and load plugins from the application's classpath.
### Proposed Behavior
In order to enable users to supply their own plugins, `PluginManager` should be able to discover and load plugins from JAR files in a given local directory.
Such external plugins should be loaded using isolated class loaders. This will allow plugins to have dependencies that would otherwise conflict with direct application dependencies (e.g. different versions). Internal / built-in plugins must continue to use the application's main class loader.
Loading of external plugins must be opt-in. The path at which plugin JARs are loaded from must be configurable.
Some references:
* https://adevinta.com/techblog/java-plugins-with-isolating-class-loaders/
* https://github.com/kestra-io/kestra/blob/develop/core/src/main/java/io/kestra/core/plugins/PluginClassLoader.java
* https://nightlies.apache.org/flink/flink-docs-release-2.1/docs/deployment/filesystems/plugins/
### Checklist
- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/hyades/blob/main/CONTRIBUTING.md#filing-issues)
- [x] I have checked the [existing issues](https://github.com/DependencyTrack/hyades/issues) for whether this enhancement was already requested
Contributor guide
Assessment
This issue has not been assessed yet.