4.5.1. Using Public Add-ons

An add-on published on Marketplace can be added to your project in one of the ways described below. The first and the second approaches assume that you use one of the standard CUBA repositories. The last approach is applicable for open-source add-ons and doesn’t involve any remote repositories.

By Studio

If you are using CUBA Studio 11+, manage add-ons via CUBA Add-Ons window as described in the Studio documentation.

For the previous CUBA Studio versions, follow the steps below:

  1. Edit Project properties and on the App components panel click the plus button next to Custom components.

  2. Copy add-on coordinates from the marketplace page or from the add-on’s documentation and paste them in the coordinates field, for example:

  3. Click OK in the dialog. Studio will try to find the add-on binaries in the repository currently selected for the project. If it is found, the dialog will close and the add-on will appear in the list of custom components.

  4. Save the project properties by clicking OK.

By manual editing
  1. Edit build.gradle and specify the add-on coordinates in the root dependencies section:

    dependencies {
        // your add-ons go here
  2. Refresh Gradle project in your IDE, e.g., by clicking CUBA → Re-Import Gradle Project in the Studio main menu, to include add-on in your project’s development environment.

  3. Edit web.xml files of the core and web modules and add the add-on identifier (which is equal to Maven groupId) to the space-separated list of application components in the appComponents context parameter:

        <param-value>com.haulmont.cuba com.haulmont.addon.cubajm</param-value>
By building from sources
  1. Clone the add-on’s repository to a local directory and import the project into Studio.

  2. Execute CUBA > Advanced > Install app component main menu command to install the add-on to the local Maven repository (by default it is ~/.m2 directory).

  3. Open your project in Studio and add the local Maven repository to the repositories list in Project > Properties.

  4. Install the add-on into the project using the CUBA Add-ons dialog in Studio. For details, see Installing add-on by coordinates in the Managing Add-ons section of the Studio User Guide.

  5. Click OK in the dialog and save the project properties.

If a project uses more than one add-ons having a web-toolkit module, then the project must have web-toolkit module too. If not, then only one widgetset from one add-on is loaded in the application. So the web-toolkit module is needed to integrate all widgetsets from used add-ons.