Creating custom components in NiFi requires only two dependencies, Java JDK and Maven. We will additionally require Git to make use of a sample repository.
- Execute
javac -version
. If an error message about the command not being found or the response showsjavac 1.X.Y_ZZ
has X being less than 7, then JDK version 7 or later must be installed.
- Available for download via: http://www.oracle.com/technetwork/java/javase/overview/index.html
- Linux: OpenJDK versions 7+ are also supported and available
- Execute
mvn -version
. If an error message about the command not being found or the response showsApache Maven 3.X.Y
has X being less than 1, then Maven 3.1.0 or later must be installed.
- Available via http://maven.apache.org/download.cgi
- Also available via homebrew for OS X and various Linux package management systems
- Execute
git --version
. If an error message about the command not being found then git must be installed.
- Executable client: https://git-scm.com/download/linux
- A version is bundled with the Mac by default
- Newer version is available via the homebrew ecosystem: http://brew.sh/
- Aptitude based systems (Debian, Ubuntu):
apt-get install git
- Yum based systems (RHEL, CentOS, Fedora):
yum install git
- Other distributions: https://git-scm.com/download/linux
- Check out the sample repository
git clone https://github.com/apiri/nifi-sample-processor-bundle.git
We only need the repository checked out above, but in the case someone wishes to start from nothing, it is possible to generate the project structure above leveraging Maven Archetypes.
Making use of the Apache NiFi Maven Archetypes
Create using
mvn archetype:generate
-DarchetypeGroupId=org.apache.nifi
-DarchetypeArtifactId=nifi-processor-bundle-archetype
-DarchetypeVersion=<NiFi Version>
-DnifiVersion=<NiFi Version>
Create using
mvn archetype:generate
-DarchetypeGroupId=org.apache.nifi
-DarchetypeArtifactId=nifi-service-bundle-archetype
-DarchetypeVersion=<NiFi Version>
-DnifiVersion=<NiFi Version>