Best Practices for Organizing Your Repositories and Package Types

Best Practices for Organizing Your Repositories and Package Types

Shani Attias
Best_Article_1__c <recomsep> Onboarding Best Practices: Jfrog Artifactory
Best_Article_2__c <recomsep> Repository Management
Best_Article_3__c <recomsep> Cli For Jfrog Artifactory
Best_Article_4__c <recomsep> Maven Repository
Best_Article_5__c <recomsep> Artifactory Rest Api

We recommend that you create your local and remote repositories around logical groupings of teams, projects, and resources. Here are some things about which you should be aware and/or should do:

  1. Any given package type that you're using should have the following:

  • A local repository (or two, if you want both snapshot and release repositories). 

  • A remote repository for each of your remote registry locations.

  • A virtual repository that contains the local and remote repositories that you created in the two bullet points above. 

Note: A given virtual repository should only point to the repositories of a single package type. Do not mix package types in a virtual repository!

  1. Bear in mind that virtual repositories resolve in the following order:

  • Local repositories, in order

  • The local cache of remote repositories, in order

  • Remote repositories, in order

Note: To optimize performance, avoid overloading your virtual repositories with things that a particular group or project type will not need to resolve.

  1. Always resolve your artifacts from JCenter before the Maven Repository.

  2. Teams may want to have their own local repositories to control permissions. You can combine them all into a virtual repository for the resolution of those artifacts.

Published: Oct. 6, 2016

Last updated: Jan. 24, 2021

Keywords: best practices, repository management, package types