This guide describes how to develop plugins for OpenFastTrace (OFT).
-
Create a new Java project and add dependency
org.itsallcode.openfasttrace:openfasttrace-api:<dependency> <groupId>org.itsallcode.openfasttrace</groupId> <artifactId>openfasttrace-api</artifactId> <version>[latest version]</version> </dependency>
-
Create a new class (e.g.
com.example.oft.import.MyImporter) using one of the following plugin APIs:org.itsallcode.openfasttrace.api.report.ReporterFactory: Generate tracing reportorg.itsallcode.openfasttrace.api.importer.ImporterFactory: Import requirements from a new file formatorg.itsallcode.openfasttrace.api.exporter.ExporterFactory: Export requirements in a new file format
Reporter plugins will usually extend
org.itsallcode.openfasttrace.api.report.AbstractReporterFactoryinstead of implementingReporterFactorydirectly so they inherit the standard context handling.Importer plugins will usually extend
org.itsallcode.openfasttrace.api.importer.AbstractImporterFactoryinstead of implementingImporterFactorydirectly so they inherit the standard context handling.Exporter plugins will usually extend
org.itsallcode.openfasttrace.api.exporter.AbstractExporterFactoryinstead of implementingExporterFactorydirectly so they inherit the standard exporter and context handling. -
Create a file in
src/main/resources/$INTERFACE_FQN, using the fully qualified class name of the interface as file name. -
Add the fully qualified class name of your new plugin class to the new file, e.g.
com.example.oft.import.MyImporter
OpenFastTrace does not use any third-party runtime dependencies by design. You can add any dependencies to your plugin if required (see note about packaging).
Warning The plugin must not use any classes other than those included in the API openfasttrace-api. All other classes in OFT are internal and may change in incompatible ways even in patch releases.
Build your plugin as a normal Java JAR file, e.g. using maven-jar-plugin. The JAR must not contain openfasttrace-api.
If your plugin uses third party dependencies, you have two options:
-
Publish and install the plugin and its dependencies as separate JARs.
-
Build a fat JAR, e.g. using
maven-shade-pluginand include the plugin's dependencies.Important: do not include
openfasttrace-apiin the fat JAR to avoid having duplicate classes on the classpath at runtime.