4.3.5. Setting Up a Private Artifact Repository

This section describes how to set up a private Maven repository and use it instead of the CUBA public repository for storing the platform artifacts and other dependencies. It is recommended in the following cases:

  • You have an unstable or slow connection to the internet. In spite of the fact that Gradle caches downloaded artifacts on the developer’s machine, you may need to connect to the artifact repository from time to time, for example when you run build for the first time or switch to a newer version of the platform.

  • You cannot have direct access to the internet due to a security policy of your organization.

  • You are not going to prolong your subscription to CUBA Premium Add-ons, but you need to be able to build your application in the future using the downloaded version of the artifacts.

The process of setting up a private repository consists of the following steps:

  • Install the repository manager software in a network connected to the internet.

  • Configure the private repository as a proxy for the CUBA public repository.

  • Make your project build script use the private repository. It can be done in Studio or right in build.gradle.

  • Perform full build of your project to cache all required artifacts in the private repository.