Installing own jar library for Maven dependency

拥有回忆 提交于 2019-12-24 19:12:53

问题


this may be the stupid question, but I haven't found the answer here : https://github.com/mosabua/maven-android-sdk-deployer (maybe I am blind). I want to use this tool to install my library into sdk and then load it to <dependency> in my POM.xml. But I can't see any instructions how to do this. My library is httpclientandroidlib-1.1.2.jar. Where should I put it and what command should I run to load it to sdk via sdk-deployer ?

I know I can use Maven Central, but they don't have the version I need.


回答1:


If I understand the question exactly you do not need the maven-android-sdk-deployer. if the issue is that you need to install the library so that you can use it you may add it to your local maven repo using something like this

mvn install:install-file -Dfile=./android-support-v4.jar -DgroupId=com.google.android -DartifactId=support-v4 -Dversion=r12 -Dpackaging=jar

from the dir where the jar is

this is what I used for android-support-v4, you need to tweak it with the proper groupId etc for the httpclientandroidlib-1.1.2.jar



来源:https://stackoverflow.com/questions/18381904/installing-own-jar-library-for-maven-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!