Publish a library to maven repositories

隐身守侯 提交于 2019-12-03 04:43:04

问题


I have a stable opensource library and was wondering how (and if) I can publish my lib to maven official repositories so people can include it in their pom.xml files and get the dependency downloaded automatically.


回答1:


The process to get your library in the central repostiory is documented in the Guide to uploading artifacts to the Central Repository. In short, the new process is to get your project hosted by one of the approved Forges that will be synced with central, the Maven folks don't rsync personal repository anymore. In your case, your best bet would be to use the Sonatype Forge (open to any OSS Project). Check the given link (and also this document).




回答2:


If you want reliable access for everyone out there, you need to stick with central. Due to the tendency of people at dev.java.net to break rules about the immutability of released artifacts, some people don't trust it. Further, it can be Very Slow.

To get your project into central, you need have your code in some public repo that they can sync from.




回答3:


  • Central repository
  • A bit less bureaucratic dev.java.net Maven2 repository - allows completely automatic deployment.


来源:https://stackoverflow.com/questions/2588858/publish-a-library-to-maven-repositories

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