Best Practices for Organizing Your Repositories and Package Types

Best Practices for Organizing Your Repositories and Package Types

AuthorFullName__c
Shani Attias
articleNumber
000001552
ft:sourceType
Salesforce
FirstPublishedDate
2016-10-06T13:38:29Z
lastModifiedDate
2024-03-10T07:48:52Z
VersionNumber
7

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