NiFi Hub is a repository of independently-versioned Apache NiFi extension bundles and versioned flow definitions. All Java code is under package com.snowflake.nifihub.
extensions/<category>/<sub-category>/nifi-<name>-bundle/-- NiFi extension bundles (Java, Maven)flows/<bucket>/<flow-name>.json-- NiFi flow definitions (JSON)flows/<bucket>/<flow-name>.md-- Flow documentation (Markdown)flows/<bucket>/tests/test_<flow-name>.py-- Flow validation tests (Python, nipyapi)pom.xml-- Root parent POM (no modules, defines shared config)checkstyle.xml-- Checkstyle rules (NiFi conventions)pmd-ruleset.xml-- PMD rules (NiFi conventions)
- Create the directory:
extensions/<category>/<sub-category>/nifi-<name>-bundle/ - Create the bundle POM with
<parent>pointing to root POM via relativePath - Create
nifi-<name>-processors/with jar packaging andnifi-<name>-nar/with nar packaging - Java package:
com.snowflake.nifihub.<category>.<name> - Register processors in
META-INF/services/org.apache.nifi.processor.Processor - Write unit tests using
nifi-mock(TestRunner) - Create a
SKILL.mdat the bundle root - Build:
./mvnw clean verify -Pcontrib-check -f <bundle-path>/pom.xml
Each bundle uses Maven CI-friendly versions via the ${revision} property. The version is defined only once in the bundle aggregator POM:
<version>${revision}</version>
<properties>
<revision>0.1.0-SNAPSHOT</revision>
</properties>Child modules (processors, NARs, etc.) reference the parent version as ${revision} and inherit it automatically:
<parent>
<groupId>com.snowflake.nifihub</groupId>
<artifactId>nifi-<name>-bundle</artifactId>
<version>${revision}</version>
</parent>To change a bundle's version, update the <revision> property in the bundle's aggregator pom.xml only. The flatten-maven-plugin ensures that installed/deployed artifacts contain the resolved version.
To override the version at build time (without editing files), pass -Drevision=<version> on the command line.
- Export the flow definition as JSON from NiFi
- Place it at
flows/<bucket>/<flow-name>.json - Create a companion
flows/<bucket>/<flow-name>.mdexplaining the flow - Create validation tests at
flows/<bucket>/tests/test_<flow-name>.py - Tests should validate JSON structure; integration tests require
NIFI_URLenv var
# Build a specific bundle
./mvnw clean verify -f extensions/<category>/<sub-category>/nifi-<name>-bundle/pom.xml
# Build with quality checks (checkstyle + PMD + RAT)
./mvnw clean verify -Pcontrib-check -f <bundle-path>/pom.xml
# Build with code coverage
./mvnw clean verify -Preport-code-coverage -f <bundle-path>/pom.xml
# Run flow tests
pip install -r flows/requirements.txt
pytest flows/<bucket>/tests/ -v- All variables that can be
finalmust befinal - No star imports
- No underscores in class names, variables, or filenames
- 200 character line width
- 4-space indentation
- Use SLF4J loggers, never System.out.println
- Use
.formatted()for string formatting, not concatenation - Include Apache 2.0 license header in all source files
- Unit tests use
nifi-mockframework viaTestRunner - Tests are named
Test<ClassName>.javaand live insrc/test/java/ - Code coverage must be >= 80%
- Flow tests use
pytestwithnipyapi