简体   繁体   中英

Maven integration with native libraries

I am using Android with Maven in my project . It depends on zbar.jar which in turn depends on the secondary artifacts like .so files. I am able to install the zbar.jar in the maven repository , but my secondary artifacts like .so files are not getting pulling through the Maven repository.

Any advice is appreciated.

Maven is designed to handle Java code. The .so files are binaries compiled for a specific architecture. Are you fully aware on the implications of using .so files?

You can

  1. Either package the so file in a jar file and write custom code to copy them in their correct position before your application runs
  2. or locate a maven plugin that does what you want. (or even an Android-Maven specific plugin)

See also Maven2 Dependencies and Native Libraries

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