How to include custom library into maven local repository?--
原文地址:https://www.mkyong.com/maven/how-to-include-library-manully-into-maven-local-repository/ There are 2 cases that you need to issue Maven’s command to include a jar into the Maven local repository manually.
P.S Trust me,there are still many jars that doesn’t support Maven. Case studyFor example,?,a popular third party Java library,which is used to generate “captcha” image to stop spam,but it’s not available in the Maven center repository. In this tutorial,we will show you how to install the “kaptcha” jar into your Maven’s local repository. 1. mvn installDownload the ““,extract it and copy the? Demo. mvn install:install-file -Dfile Now,the "kaptcha" jar is copied to your Maven local repository. 2. pom.xmlAfter installed,just declares the kaptcha coordinate in?
com.google.code
2.3
3. DoneBuild it,now the "kaptcha" jar is able to retrieve from your Maven local repository. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |