How to create an Add-On


Similar to the Cuba Add-on, is it possible to create custom add-on? The basic idea here is to define sub modules of a project as separate add-ons which can be added or removed based on the need (or say licensing).

Thanks & Regards


Hi Ranes,
This is what we are working on right now.
In the platform v.6.3, we will introduce the notion of Application Components. Any project having a special XML descriptor can be used as a component of another project. On the attached diagram, “Third-party component”, “Base Component” and “Optional Component” are the projects of such kind. Circular dependencies will not be allowed.

In fact, the changes are not that large, because the architecture of the platform enabled such dependencies between projects from the start. But in the current version, you have to define all dependency JARs in build.gradle for each module, and assign configuration properties like cuba.springContextConfig to the lists of config files from dependency projects manually. Besides, CUBA Studio cannot open projects with unknown (not CUBA and not a single base project) dependencies so you cannot benefit from the Studio tooling.

In the next version, you will just list Maven coordinates of the desired components in your build.gradle, and your build and runtime project environment will be configured automatically on the basis of descriptors provided by the components. And of course, there will be support from Studio.

If you are interested in implementation details or in the early access to the feature, watch the commits on GitHub with the “PL-7388 Application Components” message, they will appear in the next few days.

2016-06-22 10_37_04-Dependencies

Hi Konstantin,
Thank you so much for the heads-up and elaborate description.
Looks like 6.3/2.3 release will have lot of new features. Eagerly waiting for it.

Thanks & Regards

Hi Konstantin,

this sounds really great. Can you share a few use cases for this and what the main problem is you try to solve with this approach?
Is it something similar to the Grails Plugin eco system or will the add ons be more for internal code sharing between projects?


Hi Mario,
You are right in both your assumptions. With Application Components, we are trying to solve two problems:

  1. Decomposition of large projects to a set of functional modules, which can be developed independently. When deployed, they form a monolithic application, but optional modules can be switched off on building or deployment stage.
  2. Ability to produce and consume arbitrary functional modules similar to our “Premium Add-Ons” (Reporting, BPM, etc.) for the creation of an ecosystem of add-ons in the future.

The first problem is our main goal, and it will be achieved in the recent release - any project based on the platform 6.3 can be turned to an app component and used in another project. We are now working on the support for app components in Studio.

As for components ecosystem, it will probably require some centralized repository like Vaadin Add-ons repo. Besides, the app components themselves do not contain version information, so we need to implement some way of automatic control to avoid conflicts when two components use the same component of different versions.