发布一个 Spring Boot 项目作为 Maven 仓库中的库。

huangapple go评论75阅读模式
英文:

Publish a Spring Boot Project as a library in maven repository

问题

我有一个使用Spring Boot的项目,该项目在BitBucket上有一个代码仓库。这是一个Gradle项目。现在,我想将我的代码仓库发布到Maven仓库,以便我可以在其他项目中使用它。我对项目发布不太了解。针对这个情况可能的指南是什么?

英文:

I have a Spring Boot Project which has a repository over BitBucket. This is a Gradle project. Now I want to publish my repository in maven repository so that I can use it into my other projects. I'm new with publishing projects. What could be the possible guidelines for this?

答案1

得分: 0

如果您打算将您的工件用于自己的项目,并且不希望将它们分发给其他人以便在其项目中使用,您可以使用内部存储库(仅适用于Maven)。如果您想与整个世界分享您的工作,Maven网站有关于如何上传到Maven中央仓库的指南(仅适用于Maven)。

编辑:由于您正在使用Gradle,这里是您如何使用内部存储库。而这里则介绍了如何将其发布到存储库,比如Maven中央仓库。

英文:

If you intend to use your artifacts for your own projects and you don't want to distribute them so other people can use them in their projects, you can use an internal repository (maven-only). If you want to share your work with the entire world, the Maven site has a guide about how to upload to Maven Central (maven-only).

EDIT: Since you're using gradle, this is how you use internal repositories. And this is how you publish to a repository, like Maven Central.

huangapple
  • 本文由 发表于 2020年8月23日 00:22:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/63538456.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定