Packaging

Extraction plugins are packaged as OCI images (also known as Docker images). The OCI images are labeled with the PluginInfo. To automate packaging of a Java plugin and labeling the OCI image, the Extraction Plugin SuperPom has been configured to automate this for you.

If your project uses the Extraction Plugin SuperPom (see Prerequisites), Packaging an extraction plugin is handled by Maven. To package your plugin into a container image, the following command can be used:

mvn package docker:build

This will generate a plugin image:

  • The extraction plugin is added to your local image registry (docker images),

  • The image name is extraction-plugin/PLUGINID, e.g. extraction-plugin/nfi.nl/extract/chat/whatsapp,

  • The image is labeled with two tags: latest, and your plugin version.

It is possible to apply extra arguments to the docker command as described here. For example, to specify a proxy, use the following command:

mvn package docker:build -Ddocker.buildArg.https_proxy=https://proxy:8001

Once your plugin is packaged, it can be published or ‘uploaded’ to Hansken. See “Upload the plugin to Hansken” for instructions.

Note: if your build environment does not have Docker available, you can use podman as an alternative. Install podman on your machine or build agent, and run the following commands before invoking the mvn package docker:build command:

podman system service --time=0 unix:/run/user/$(id -u)/podman/podman.sock &
export DOCKER_HOST="unix:/run/user/$(id -u)/podman/podman.sock"