4 best practices in repository configuration

1. If you are using several technologies, (e.g. Nuget, Maven, NPM, PyPi etc..) define a unique repository for each of them. By doing that you are making sure that all of the build requests are directed to the right place rather than going to a repository that may not even have the necessary packages.

2. Define a virtual repository for each of your team / builds. By only including repositories that each team/build needs in its virtual repository, you save time because requests only get sent to relevant repositories. This allows you to optimize the resolution time for your builds. Please also note that when working with different technologies, each packaging technology expects to get metadata in its corresponding format, therefore, you should define a separate virtual repository for each packaging format.

3. Use Artifactory’s Include / Exclude content feature – Define an exclude pattern on remote repositories to prevent Artifactory for searching through them for packages that you know can not exist on them. For example, if you store all of your internal proprietary packages (e.g. **/mycompany/myproject.*) in a local repository, there is no point searching for them on a remote repository. So define an exclude pattern on the remote repository that excludes it when you are resolving your local proprietary packages. This avoids redundant network traffic and ultimately saves a lot of time. Conversely, if you know that a package only exists on a specific remote repository, define an include pattern on that repository. That way, Artifactory will only try to resolve that specific package from the repository and not waste time and network resources trying to resolve other packages from that repository.

4. Working with Maven – There is no need to have 5 Maven remote repositories. just point your builds at JCenter and all of your java requests will receive a quick response. JCenter is managed and maintained by JFrog and works perfectly for Artifactory users.