Apache NiFi - MiNiFi - C++ Windows Build Guide


Apache NiFi MiNiFi C++ has been built on Window Server 2016, 2019, and Windows 10 operating systems. The project is CMake focused we suggest building via Visual Studio 2017 or our win_build_vs.bat script.

The project previously required OpenSSL to be installed. If you follow our build procedures, below, you will not need to install that dependency.

Required software

  • Visual Studio 2017
  • CMake
  • Git
  • (Optional) WiX Toolset (only for building the MSI)
  • (Optional) JDK (only for JNI support)

JNI support

Though the project is written in C++, JNI functionality supports running Java processors stored in NiFi Archives. These can be run in a much smaller memory footprint and consume fewer resources. If your systems do not support Java or you do not want a JDK installed, please use non-JNI builds.

Building with Visual Studio

Make sure your Visual Studio installation includes the “Visual C++ tools for CMake” and “Visual C++ ATL for x86 and x64” options. You can also add these after installation using the Visual Studio Installer app. We also advise installing WiX and Visual Studio Command Prompt via the marketplace. To do this please go to the Tools Menu, followed by Extensions and Updates. Once the popup displays you may install additional features from Online sources in the Online menu.

A file named CMakeSettings.json provides the CMake configuration.

CMake must generate its cache, under Cache in the CMake Menu. After that is complete go to ‘Build Only’ under the CMake menu. Due to limitations in Visual Studio's CMake support, it is advised that you build minifi.lib then minifi.exe targets. Build All works, too, but it takes much longer. Once you have built these targets, you may use the cpack command to build your MSI. If you are building with JNI functionality the MSI will be significantly larger (about 160 MB) since it contains the base NARs to run the standard set of Apache NiFi processors.

Building via the build script

The preferred way of building the project is via the win_build_vs.bat script found in our root source folder. Its first parameter is mandatory, the directory in which it will build the project. build is a good default choice for this.

After the build directory it will take optional parameters modifying the CMake configuration used in the build:

/TDisables tests
/PEnables MSI creation
/KEnables Kafka extension
/JEnables JNI
/SEnables SQL
/CEnables CoAP
/AEnables AWS
/MCreates installer with merge modules
/64Creates 64-bit build instead of a 32-bit one
/DBuilds RelWithDebInfo build instead of Release
/DDBuilds Debug build instead of Release


  • 32-bit build with kafka, disabling tests, enabling MSI creation: win_build_vs.bat build32 /T /K /P
  • 64-bit build with JNI, with debug symbols: win_build_vs.bat build64 /64 /J /D

win_build_vs.bat requires a Visual Studio 2017 build environment to be set up. For 32-bit builds this can be achieved by using the x86 Native Tools Command Prompt for VS 2017, for 64-bit builds by using the x64 Native Tools Command Prompt for VS 2017.

Building directly with CMake

The project can also be built manually using CMake. It requires the same environment the build script does (the proper Native Tools Command Prompt).

A basic working CMake configuration can be inferred from the win_build_vs.bat.

win_build_vs.bat /64 /P is equivalent to running the following commands:

mkdir build
cd build
msbuild /m nifi-minifi-cpp.sln /property:Configuration=Release /property:Platform=Win32
copy main\Release\minifi.exe main\
ctest -C Release