Changes made to the Maven build process:
* Introduced OSGi Blueprint XML file and Bean class too automatically load the native library. * Introduced integration testing module to deploy to Karaf OSGi implementation. * Clears library executable stack flag during build. * Updated README document.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package org.opencv.osgi;
|
||||
|
||||
/**
|
||||
* Dummy interface to allow some integration testing within OSGi implementation.
|
||||
*/
|
||||
public interface OpenCVInterface
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.opencv.osgi;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* This class is intended to provide a convenient way to load OpenCV's native
|
||||
* library from the Java bundle. If Blueprint is enabled in the OSGi container
|
||||
* this class will be instantiated automatically and the init() method called
|
||||
* loading the native library.
|
||||
*/
|
||||
public class OpenCVNativeLoader implements OpenCVInterface {
|
||||
|
||||
public void init() {
|
||||
System.loadLibrary("opencv_java320");
|
||||
Logger.getLogger("org.opencv.osgi").log(Level.INFO, "Successfully loaded OpenCV native library.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user