Skip to content

A sbt plugin for creating NiFi Archive bundles to support the classloader isolation model of NiFi.

License

Notifications You must be signed in to change notification settings

tonykoval/sbt-nifi-nar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt-nifi-nar plugin Actions Status Maven Central

A sbt plugin for creating NiFi Archive bundles to support the classloader isolation model of NiFi. Many functionality is from project sbt-pack and nifi-maven

Features

  • sbt nar creates a distributable package in target/nar folder
    • All dependent jars including scala-library.jar are collected in target/nar/META-INF/bundled-dependencies folder
    • Create target/nar/META-INF/MANIFEST.MF with necessary properties
  • sbt narArchive generates nar archive that is ready to distribute
    • The archive name is target/{project name}-{version}.nar
  • sbt generateDocProcessors generates documentation html files in folder docs for processors (subclass of org.apache.nifi.processor.AbstractProcessor)
    • Each processor has own html file docs/${processor-name}.html that is generated by NiFi
    • docs/index.html contains list of processors

Usage

Add sbt-nifi-nar plugin to your sbt configuration:

project/plugins.sbt

Maven Central

addSbtPlugin("com.github.tonykoval" % "sbt-nifi-nar" % "(version)")

Projects

Minimum configuration

build.sbt

// [Required] Enable plugin
enablePlugins(NarPlugin)

// [Required] Nifi version
nifiVersion := "1.13.2"

// [Optional] check trait `NarKeys`

// [Optional] add manifest attributes
packageOptions := Seq(
  ManifestAttributes(
    ("Custom-Key", "Custom-Value")
  )
)

Now you can use sbt narArchive command in your project.

TODO

  • dependency graph
  • support extensions

Test

To test sbt-nifi-nar plugin, run

$ sbt scripted

Contribute

Any issues, feature requirement and contributions are welcome!

License

Except as otherwise noted this software is licensed under the Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

A sbt plugin for creating NiFi Archive bundles to support the classloader isolation model of NiFi.

Resources

License

Stars

Watchers

Forks

Packages

No packages published