Is your feature request related to a problem? Please describe.
OFT can only discover third-party plugins from the fixed directory
$HOME/.oft/plugins/<plugin-name>/*.jar. There is no public API to tell OFT about
plugin JARs at runtime:
ServiceLoaderFactory is package-private and hardcodes the plugin directory.
InitializingServiceLoader.load(Class<T>, C) is the only public entry point and
accepts no plugin locations.
ClassPathServiceLoader.filterOtherClassLoader rejects any service whose
getClass().getClassLoader() differs from the origin's class loader.
This forces embedders that resolve plugins through their own dependency mechanism
(e.g. the Gradle plugin openfasttrace-gradle, which resolves pluginDependencies
via a Gradle configuration) to work around the API by replacing the thread context
class loader (TCCL) with a child-first loader. Because of the class-loader identity
filter above, that workaround must additionally locate and copy OFT's built-in
provider JARs (importer/exporter/reporter factories) into the same child loader —
otherwise built-in reporting and importing silently disappear as soon as any plugin
is configured.
The result is a fragile, hard-to-maintain workaround in the embedder that duplicates
logic OFT already implements correctly for $HOME/.oft/plugins (ServiceOrigin +
ChildFirstClassLoader).
Describe the solution you'd like
A public, programmatic way to pass plugin JAR paths to OFT, e.g.:
Oft oft = new OftRunner(List.of(pluginJar1, pluginJar2));
Is your feature request related to a problem? Please describe.
OFT can only discover third-party plugins from the fixed directory
$HOME/.oft/plugins/<plugin-name>/*.jar. There is no public API to tell OFT aboutplugin JARs at runtime:
ServiceLoaderFactoryis package-private and hardcodes the plugin directory.InitializingServiceLoader.load(Class<T>, C)is the only public entry point andaccepts no plugin locations.
ClassPathServiceLoader.filterOtherClassLoaderrejects any service whosegetClass().getClassLoader()differs from the origin's class loader.This forces embedders that resolve plugins through their own dependency mechanism
(e.g. the Gradle plugin
openfasttrace-gradle, which resolvespluginDependenciesvia a Gradle configuration) to work around the API by replacing the thread context
class loader (TCCL) with a child-first loader. Because of the class-loader identity
filter above, that workaround must additionally locate and copy OFT's built-in
provider JARs (importer/exporter/reporter factories) into the same child loader —
otherwise built-in reporting and importing silently disappear as soon as any plugin
is configured.
The result is a fragile, hard-to-maintain workaround in the embedder that duplicates
logic OFT already implements correctly for
$HOME/.oft/plugins(ServiceOrigin+ChildFirstClassLoader).Describe the solution you'd like
A public, programmatic way to pass plugin JAR paths to OFT, e.g.: