I am trying to use maven to create a project that depends on the JNI wrapper around the OpenCV computer view library. I was able to "maven-ize" the OpenCV wrappers here: http://ubaa.net/shared/processing/opencv/ using the FreeHEP NAR maven plugin, but the documentation for that plugin is somewhat lacking.
I managed to create a project (imagedetect) which depends on the OpenCV java project (I call it OpenCVJava). imagedetect will compile, however, any test, integration-test, or package target is not in error with libraries missing from java.library.path.
!!! required library not found : no OpenCV in java.library.path Verify that the java.library.path property is correctly set and 'libcxcore.so', 'libcv.so', 'libcvaux.so', 'libml.so', and 'libhighgui.so' are placed (or linked) in one of your system shared libraries folder
This is especially unpleasant - the only way to solve this problem is to somehow track the .nar file for opencv libraries, manually extract them, install java.library.path, and then call the gnaraly java command to actually run the tests / applications using the appropriate pathpath / library. This will not work - especially if this problem persists in transitive dependencies.
How can I clean the build / test / run system? I'm not configured for FreeHEP, but I would like to stick with maven as it makes our most common use cases a lot easier.
FreeHEP Nar plugin: http://java.freehep.org/freehep-nar-plugin/intro.html
source share