Skip to content
Curtis Rueden edited this page Feb 29, 2016 · 5 revisions

We gladly welcome working examples of the NAR plugin in use!

Example projects

These projects provide small examples of how to use the NAR plugin:

  1. jjYBdx4IL/nar-maven-plugin-jni-example

Open source projects

Several open source projects make use of the NAR plugin:

  1. SLIM-curve uses NAR with some extra configuration, and may be a good second project to study for seeing a few more parameters in action.

  2. ImageJ has a native launcher component which uses NAR. Search the pom.xml for "nar" to find the relevant blocks. It is not a simple "hello world" example (e.g., it uses OS-specific profiles), but it is a working real-world use case which successfully builds on a Jenkins server farm including Windows, OS X and Linux nodes.

  3. RpiCastServer (educational code) is a server implementing the DIAL protocol, intended to run in a Raspberry Pi to give similar functionality to a Chromecast device.

Ready-to-use native dependencies

In addition, there are some projects which provide NAR-packaged open source libraries, ready to be included as dependencies in your Maven projects:

  1. boost-nar packages the Boost C++ libraries in Maven form as NAR artifacts.

  2. Narlibs is a collection of NAR-packaged open source libraries, including rapidjson, ZeroMQ, log4cplus, Google Test and LIBNODAVE.

NAR integration tests

Lastly, see the NAR plugin's own integration tests. You can run a specific integration test using:

mvn -Prun-its -Dinvoker.test=<directory-name>

where <directory-name> is something like it0003-jni.

Clone this wiki locally