How to make add-on depends on jmix existing add-ons?

I created a composite project as follows:

myproject → Composite project
- myproject-data → Single Module Add-on
- myproject-rest → Rest Service Application
- myproject-backoffice → Single Module Application(Java)
- myproject-backoffice_for_client → Single Module Application(Java)

myproject-data is the module provides data, we define all the entities in the module.
myproject-rest, myproject-backoffice and myproject-backoffice_for_client depends on myproject-data.

myproject-rest is used for providing Rest Services for React JS and React Native front-end application.
myproject-backoffice is used for company’s CS or admin to operate.
myproject-backoffice_for_client is used for clients to log in to operate.

myproject-data will manage all the database change(all the liquibase changelogs are in the module)

Problems: I want to insert records to SEC_ROLE_ASSIGNMENT table in the liquibase changelog in myproject-data, but the table is not created. I think it is add-on dependent issue. How can I make an add-on module depend on an existing module?

In my case, if I can let the myproject-data module depends on add-on, it will solve my issue.

Hi ,

You shoud see a Configuration class geneated by Studio , this class has a @JmixModule annotation, you can use dependsOn field of @JmixModule annotation to specify the dependencies.


1 Like

Solved my issue, that is exactly what I need. Many thanks.

Please note that you can use “Settings → Dependencies Between Subprojects” action of the composite project to configure dependencies in build.gradle and @JmixModule simultaneously.

Thanks. I will have a try on the option. I have used the way "Settings → Dependencies Between Subprojects” to make one of my modules depends on another. Not sure if it works for one of my module depends on OOTB modules.