我可以从JCenter删除库吗? [英] Can I remove a library from JCenter?

查看:286
本文介绍了我可以从JCenter删除库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一些外部库,今天早晨我偶然发现一个想法:如果发布者从JCenter,Maven Central等中删除了他的库,该怎么办? (我将只关注这两个主要回购.)

I'm working with some external libraries, and I stumbled across a thought this morning : what if the publisher removes his library from JCenter, Maven Central, etc...? (I'll just focus on those 2 main repo.)

根据 this 和一些其他研究,Maven Central似乎可以保存库,而您无法删除某些内容.

According to this and some other researches, Maven Central seems to save libraries and you are unable to delete something.

但是,对于JCenter,我无法找到准确的答案.因此,我创建了自己的Bintray帐户,创建了一个程序包,并向其中推送了一些库.然后,我通过单击此按钮将其链接到JCenter(并在6小时后等待成为接受者,为什么?(合法问题)):

However, for JCenter, I was unable to find an accurate answer. So I created my own Bintray account, created a package and pushed some library to it. Then I linked it to JCenter by clicking this button (and waiting to be accepter 6 hours later, why though? (legit question)):

现在,我拥有一个使用Jcenter的Android Studio项目可访问的库,因此我试图在Bintray帐户中弄乱.

Now that I had a library accesible from an Android Studio project with Jcenter, I tried to mess around within the Bintray account.

来自此线程该文档,我应该能够删除某些内容,并完整整理自己的内容包消失了.我唯一能做的就是删除帐户,完整的软件包或版本.我尚未测试它,因为根据线程,JCenter会创建它的副本,如果您不取消链接,我将无法控制它. 但是,我无法像在文档中那样手动删除某个版本的文件,也无法像在线程中那样从程序包中取消链接" JCenter.

Coming from this thread and the documentation, I should be able to delete some things, and make my whole package disappear. The only thing I'm able to do is delete account, complete package or version. I didn't tested it yet because according to the thread, JCenter would create a copy of it that I would have no control over if you don't unlink it. However, I couldn't delete one file manually in a version as they do in the docs, neither could I "unlink" JCenter from my package as they do in the thread.

所以,我有多个问题:

  • 这一切必要吗?
  • 是否有可能删除某些内容?
  • 我应该为我在本地使用的每个库制作一个副本(并且还要为每个库的依赖项制作一个副本)吗?
  • 人们所说的和我看到的之间JCenter发生了什么?

推荐答案

Jcenter设计为不可变的,因为它为许多依赖于其软件包的用户提供服务.

Jcenter was designed to be immutable as it serves many users that depend on its packages.

一旦程序包链接到jcenter,它就在那里.

Once a package is linked to jcenter it is there to stay.

如果所有者删除了程序包,bintray会通过声明所有权(创建要由jcenter拥有的程序包副本)来确保其可用.

If the owner deletes the package, bintray makes sure it stays available by claiming ownership (creating a copy of the package to be owned by jcenter).

最佳实践是仅在您版本中的代码准备好生产后才将软件包链接到jcenter.最初的包含是一个一次性的过程.在jcenter中授予您自己的路径名称空间后,您将发布的任何新版本都会自动出现在jcenter中.

The best practice would be to link your package to jcenter only after the code in your versions is production ready. The initial inclusion is a one off process. Once you have been granted your own path namespace in jcenter any new version you will publish will automatically appear in jcenter.

将文件/版本发布到二进制文件后,您有180天的宽限期删除它们.此后,它们变为不可变,无法删除.

After publishing files/versions to bintray you have 180 days of grace to delete them. After that they become immutable and cannot be deleted.

如果您仍处于宽限期,则还可以从链接的软件包中删除特定文件或版本,但您将损害OSS发布者的声誉!,因为人们将导入这些版本来自jcenter,您将破坏他们的代码.这被认为是不好的做法.

You can also delete a specific file or version from a linked package if you are still in the grace period but you will be damaging your reputation as an oss publisher! since people will be importing those versions from jcenter and you will be breaking their code. this is considered bad practice.

希望这会有所帮助.

这篇关于我可以从JCenter删除库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆