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.
I'm familiar with setting up public Maven repos, but am unsure of the best way to set up a private remotely accessible repo.
How can I do this?
There are 3 types of maven repository: Local Repository. Central Repository. Remote Repository.
Maven central repository is located at http://repo.maven.apache.org/maven2/. Whenever you run build job, maven first try to find dependency from local repository. If it is not there, then, by default, maven will trigger the download from this central repository location.
remote repositories refer to any other type of repository, accessed by a variety of protocols such as file:// and https:// . These repositories might be a truly remote repository set up by a third party to provide their artifacts for downloading (for example, repo.maven.apache.org).
The solution is to use a Maven Repository Manager, such as Nexus, Artifactory or Archivia.
You install the MRM on a server and configure it with the authentication details of the users you want to have access it.
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.
Artifactory is available as an on-line hosted service, and we use it (the on-line hosted service) for our internal artifact hosting.
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. I do not know if there is an online Nexus or Archivia hosting service.
Now for the disclosures:
I do not recommend which MRM you use. But as a Maven committer and PMC member I strongly recommend using a MRM.
Amazon S3 is the best solution: http://www.stackoverflow.com/questions/850570/maven-s3-wagon-provider, because:
You may also find this article helpful: http://www.yegor256.com/2015/09/07/maven-repository-amazon-s3.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With