Is it possible to manage native libraries (.so) under maven?
We use some jars with dependences on external native libs, so I’m looking for some way to mavenize them.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think that the "common" approach is to bundle the native libraries in platform specific JARs using classifiers (e.g.
mylib-1.2.3-solaris.jar) on which you could depend like any other JAR with classifier:And then, unpack them with the
maven-dependency-pluginand theunpack-dependenciesmojo.Also have a look at this previous answer, the Wrapping a Native Library with Maven post and the section 5.5.3. Platform Classifiers of the Maven: the complete reference,