简体   繁体   English

将 jar 文件发布到 GitLab package 存储库

[英]Publish a jar file to GitLab package repository

I have a scala project, and using SBT I was able to generate a jar file out of it.我有一个scala项目,使用SBT我能够从中生成一个jar文件。

My next challenge is to to publish the generated jar file into Gitlab's package repository so I can reference this jar file (module) in another scala project. My next challenge is to to publish the generated jar file into Gitlab's package repository so I can reference this jar file (module) in another scala project. I found several resources for that, using MAVEN or SBT.. but not sure how do I start, because I'm new to it and I'm a bit lost.我为此找到了几个资源,使用 MAVEN 或 SBT .. 但不知道如何开始,因为我是新手,我有点迷路了。 Is it possible to publish the file using SBT as well?是否也可以使用SBT发布文件?

Reference 1 : I'm lost in between GRADLE and MAVEN 参考 1 :我迷失在 GRADLE 和 MAVEN 之间

Reference 2 : I'm lost with this, because It's not clear to me how to achieve it and what is the relation in between the maven repository and the jar file. 参考 2 :我对此感到迷茫,因为我不清楚如何实现它以及 maven 存储库和 jar 文件之间的关系是什么。

Any simple guidance/clarification is greatly appreciated.非常感谢任何简单的指导/澄清。

You should look at the SBT way of publishing: https://www.scala-sbt.org/1.x/docs/Publishing.html您应该查看 SBT 的发布方式: https://www.scala-sbt.org/1.x/docs/Publishing.html

And then adapt the "repository URL" to be the one of your Gitlab.然后将“存储库 URL”调整为您的 Gitlab 之一。 And follow Gitlab documentation of any specific configuration must be defined.并遵循 Gitlab 文档,必须定义任何特定配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM