简体   繁体   中英

How can I set the native library for a dependency using maven?

I am using microsoft tfs sdk jar which requires a native library. I can set the native library using : System.setProperty("com.microsoft.tfs.jni.native.base-directory","C:\\path\\");

I am now using a maven project and the tfs sdk jar is a maven dependeny How can I set the native library for the dependency using maven ?

You need to use a "Native Lib Loader" helper.

The source to one is here: https://github.com/scijava/native-lib-loader

Best via Maven/Gradle or similar: http://mvnrepository.com/artifact/org.scijava/native-lib-loader/

Where you need to add the natives to the project and the required naming convention ca be found in "org.scijava.nativelib.NativeLibraryUtil"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM