[英]How do I setup a private, remotely accessible Maven repository?
I need to set up a Maven repository for some internal company libraries, that need to be accessible only to our developers (ie. secure), yet should be securely accessible over the Internet. 我需要为一些内部公司库设置一个Maven存储库,这些存储库只能由我们的开发人员访问(即安全),但应该可以通过Internet安全地访问。
I'm familiar with setting up public Maven repos, but am unsure of the best way to set up a private remotely accessible repo. 我熟悉设置公共Maven回购,但不确定设置私有远程可访问回购的最佳方式。
How can I do this? 我怎样才能做到这一点?
The solution is to use a Maven Repository Manager, such as Nexus, Artifactory or Archivia. 解决方案是使用Maven Repository Manager,例如Nexus,Artifactory或Archivia。
You install the MRM on a server and configure it with the authentication details of the users you want to have access it. 您在服务器上安装MRM,并使用您要访问它的用户的身份验证详细信息对其进行配置。
You can see a publicly accessible Nexus instance at https://oss.sonatype.org and also at https://repository.apache.org So on that basis it is fairly safe to assume that the authentication in Nexus is reliable and secure. 您可以在https://oss.sonatype.org以及https://repository.apache.org上看到可公开访问的Nexus实例。因此,在此基础上,假设Nexus中的身份验证是可靠且安全的是相当安全的。
Artifactory is available as an on-line hosted service, and we use it (the on-line hosted service) for our internal artifact hosting. Artifactory可用作在线托管服务,我们使用它(在线托管服务)进行内部工件托管。
Archivia is maintained by some really good guys and I suspect they have that well locked down too. 档案馆由一些非常好的人维护,我怀疑他们也有很好的锁定。
If you want to get up and running fast and you don't want to have to manage a server, I would recommend using a hosting service such as Artifactory. 如果您想快速启动并且不想管理服务器,我建议您使用Artifactory等托管服务。 I do not know if there is an online Nexus or Archivia hosting service.
我不知道是否有在线Nexus或Archivia托管服务。
Now for the disclosures: 现在披露:
I do not recommend which MRM you use. 我不建议您使用哪种 MRM。 But as a Maven committer and PMC member I strongly recommend using a MRM.
但作为Maven提交者和PMC成员,我强烈建议使用MRM。
Amazon S3 is the best solution: http://www.stackoverflow.com/questions/850570/maven-s3-wagon-provider , because: Amazon S3是最佳解决方案: http : //www.stackoverflow.com/questions/850570/maven-s3-wagon-provider ,因为:
You may also find this article helpful: http://www.yegor256.com/2015/09/07/maven-repository-amazon-s3.html 您可能还会发现本文有用: http : //www.yegor256.com/2015/09/07/maven-repository-amazon-s3.html
自发布此问题以来,我发现了JitPack ,这使得直接从Github创建公共(免费)和私有(廉价)回购非常容易。
You can place username/passwords on different repos on your server with archiva or nexus. 您可以使用archiva或nexus将用户名/密码放在服务器上的不同存储库中。 You can also manage who can deploy to those repos.
您还可以管理可以部署到这些存储库的人员。
These can be added to your settings.xml file so you don't have to login every time. 这些可以添加到settings.xml文件中,因此您不必每次都登录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.