简体   繁体   English

如果Maven存储库发布者删除其存储库,那么在Android Studio中具有远程库依赖项的项目会发生什么情况

[英]What happens to project with remote library dependency in android studio if maven repository publisher removes his repository

For Example you are using this library and sometimes later this library no longer exist in maven so what happens to your project? 例如,您正在使用此库,有时以后该库在maven中不再存在,那么您的项目会怎样?

Can we be able to continue developing that project using this kind of remote library? 我们可以使用这种远程库继续开发该项目吗? or we need to replace codes that uses this library? 还是我们需要替换使用该库的代码?

dependencies {
    compile 'com.github.chrisbanes.actionbarpulltorefresh:library:+'
}

I guess the easiest would be to simply clone this library: 我想最简单的就是简单地克隆这个库:

git clone https://github.com/chrisbanes/Android-PullToRefresh.git

and push it to your github account Pushing from local repository to GitHub hosted remote 并将其推送到您的github帐户从本地存储库推送到GitHub托管的远程

If you are talking about a dependency like the above which is in Maven Central the dependency will never be deleted in Maven Central, cause you can't delete artifacts in Maven Central. 如果您正在谈论Maven Central中的上述依赖项,则该依赖项将永远不会在Maven Central中删除,因为您无法在Maven Central中删除工件。

If the depenedency is comming from somewhere else you might better duplicate the code into your internal system or the best solution would be to use a repository manager which contains every artifact which you ever used and you can backup this system without the need of Maven Central. 如果依赖于其他地方,则最好将代码复制到内部系统中,或者最好的解决方案是使用存储库管理器,其中包含您曾经使用过的所有工件,并且无需Maven Central即可备份该系统。 Thinking of breaking network connections or something similar. 考虑断开网络连接或类似的操作。

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

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