Skip to content

The plugin system

Java’s ServiceLoader reads files named META-INF/services/<interface name> from every JAR on the classpath. Each file lists classes that implement that interface. Putting a plugin JAR on the classpath is therefore enough; nothing is configured.

Step Who What
1 Plugin author Implements SparkUdf and lists the class (or uses @AutoService)
2 Release pipeline Builds, tests, signs and uploads the JAR to Maven Central
3 Engine Calls ServiceLoader.load(SparkUdf.class) and registers each result
  • The engine never mentions a specific plugin, so it does not need to change when one is added.
  • Plugins depend only on the small contract (core-udf), not on the engine.

Each plugin is its own repository with the same shared pipeline: build and test, vulnerability scan, quality gate, then a release to Maven Central when the version in pom.xml has no tag yet. See Release a version.