如何将JAR部署到Maven远程存储库 [英] How to deploy JAR to Maven remote repository
问题描述
有没有办法将我的JAR文件放在远程存储库中,所以我的maven项目可以通过Internet从任何地方获取这个JAR文件?
Is there any way to put my JAR file in remote repository, so my maven project can get this JAR file from any place via Internet?
我已经下载了在ReportNG项目中做了一些修复: https://github.com/dwdyer/reportng 。
使用ANT我已经将这个项目编译成JAR,现在我想把它放到远程Maven存储库中,但是我不知道怎么做。
I have downloaded and did some fixes in the ReportNG project: https://github.com/dwdyer/reportng . Using ANT I have compiled this project into JAR, now I want to put it into remote Maven repository, but don't know how I can do that.
有人可以建议我这样做,我该怎么做?
Could somebody please suggest me the way, how I can perform that?
推荐答案
如果是你要发布的版本可在maven central中使用本指南: http://maven.apache .org / guides / mini / guide-central-repository-upload.html
If it is a released version you want to make available in maven central follow this guide: http://maven.apache.org/guides/mini/guide-central-repository-upload.html
我不是专业的github,但因为maven repo只是一个文件结构与一些元数据,你可以把它放在任何地方maven可以读取它(ftp,http,...)。所以你可以创建一个git repo来托管你的maven工件。请参阅 http://cemerick.com/2010/08/24 / hosting-maven-repos-on-github / 举个例子。 (它可能已经过时了 - github可能有类似maven repo托管的东西,我只是不知道)
I'm no github professional but since a maven repo is just a file structure with some meta-data you can put it anywhere maven can read it (ftp, http, ...). so you could create a git repo to host your maven artifacts. see http://cemerick.com/2010/08/24/hosting-maven-repos-on-github/ for an example. (it may be outdated - github may have something like maven repo hosting, I just dont know)
这篇关于如何将JAR部署到Maven远程存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!