Is there a straightforward way to merge 2 existing jmix apps?

Hi there,

I need to merge 2 existing JMIX apps. Is there any special consideration I need to take into account regarding the internal workings of JMIX to attain that?

What do you thing would be best? Create an app from scratch and create entities screens and beans by copying and pasting code from the previous apps? Or can simply put the main files from one app into another and go over some inner workings file modifications? The point is that presumably the database and liquibase get thrown off. So I don’t think that’s a good decision.

Presumably the first approach is better. Create app from scratch by:

  1. creating the entities and pasting in the entity source code not related to class fields
  2. creating the screens and pasting in the xml for descriptors and code for controllers
  3. creating the managedbeans and pasting in the code from each correrspondent bean.

That way I would easily create a data model and would be able to easily migrate the information with minor manual adjustments.

What do you think? Any suggestions?

Thanks in advance.

Regards,
Carlos.

Hi Carlos,

Both approaches should work.
Just keep in mind that there must be a single base package where the main app class is located, above all other application code.
The following package structure will work:

com.company.newapp
    app1
      entity
      screen
    app2
      entity
      screen
    NewAppllication.java (contains @SpringBootApplication)

Also note that you can copy-paste the whole Java files between projects opened in IDE and it will update packages in the classes according to the target structure. But you will need to change paths manually in XML and property files.

Regards,
Konstantin