Fluxtion provides a maven plugin that automates the AOT generation of event processors. This confines the generation
process to a build time activity which means only the runtime libraries are required at runtime, and the compiler library
can be provided scope.
If maven plugin generates all processors AOT then the compiler library can be moved to provided scope and the runtime
library explicitly added to the runtime scope of the application. This vastly reduces runtime dependencies.
The maven plugin formats source files using the Google formatter which requires maven to export certain packages. Add a
jvm.config file in a .mvn directory of your root project, for reference see the .mvn/jvm.config
used in these examples.
FluxtionGraphBuilder scan and compile
The maven plugin uses the discovery method described in processor generation scan for fluction graph builders.
As the plugin performs the discovery operation as part of the build there is no need to write a main method to invoke the
scan and compile function
Requirements to create a discoverable builder
Implement the interface FluxtionGraphBuilder. The two call back methods separate graph building and compiler configuration
Add fluxtion-maven-plugin to the build, configure the plugin to execute the scan goal
Any Builder annotated with @Disabled is ignored by the scan function
Fluxtion provides a maven plugin that automates the AOT generation of event processors that are driven by spring config files.
The maven plugin should configure the file location of the spring config file to use in the AOT generation process.
Requirements to generate event processor
Create a spring config file in the classpath
Add fluxtion-maven-plugin to the build configure the plugin to execute the springToFluxtion goal with configuration: