5.3.2. Configuring Access to Repository

CUBA Studio Server window contains a field where you can select an artifact repository. By default, it contains two entries:

  • https://repo.cuba-platform.com/content/groups/work - a repository located at Haulmont’s server. It requires common credentials which are specified right in the build script (cuba / cuba123).

  • https://dl.bintray.com/cuba-platform/main - a repository hosted at JFrog Bintray. It has anonymous access.

Both repositories have identical contents for the latest platform versions. We assume that Bintray is more reliable for worldwide access.

When you create a new project in CUBA Studio, it’s build.gradle contains the link to the repository which is selected in the Studio server window. In case of Bintray, the build script is also configured to use Maven Central, JCenter and Vaadin Add-ons repositories separately.

If your project uses CUBA Premium Add-ons, Studio adds one more repository:

  • In case of repo.cuba-platform.com it is https://repo.cuba-platform.com/content/groups/premium

  • In case of Bintray it is https://cuba-platform.bintray.com/premium

Both Premium Add-ons repositories require a user name and a password which are provided by per-developer subscription. The first part of your license key before dash is the repository user name, the part after dash is the password. For example, if your key is 111111222222-abcdefabcdef, then the user name is 111111222222 and the password is abcdefabcdef.

When you build the project from Studio, it passes repository credentials to Gradle automatically. If you want to build the project outside Studio, you can pass premiumRepoUser and premiumRepoPass in the command line arguments with -P prefix. In case of Bintray, the user name must be followed by @cuba-platform.

Example of building with repo.cuba-platform.com:

gradlew assemble -PpremiumRepoUser=111111222222 -PpremiumRepoPass=abcdefabcdef

Example of building with Bintray:

gradlew assemble -PpremiumRepoUser=111111222222@cuba-platform -PpremiumRepoPass=abcdefabcdef

Instead of passing credentials each time you build the project from the command line, you can once set the following environment variables:

  • CUBA_PREMIUM_USER - will be used if premiumRepoUser is not passed.

  • CUBA_PREMIUM_PASSWORD - will be used if premiumRepoPass is not passed.