How to manual enable hot deploy

Hi team,

Somehow hot deploy doesn’t work in one of my demo project, i.e. change screen controller can’t trigger hot deploy . Could you please guide how to enable again?

Jmix version: 1.4.1
Jmix Studio plugin version: 1.4.2-223
IntelliJ version: IntelliJ IDEA 2022.3.1 (Ultimate Edition)

Run configuration:
image

Jmix project settings:
image

2 Likes

Hi Bryan,

So you don’t see anything like this in the console after saving changes in the IDE?

Hot deploy: user-browse.xml [0 ms]
    user-browse.xml -> .jmix/conf

Hot deploy: UserBrowse.java [2246 ms]
Compiled files:
    com/company/onboarding/screen/user/UserBrowse.java

Hi Konstantin,

Right, I can’t see such logs in console.

Hi, Bryan

There is only one way to manually enable/disable hot deploy. And as I see on the screenshot it is enabled in your case.
Most likely that hot deploy doesn’t work because Studio can’t detect for some reason that the application is running. Maybe the project has some custom port definition.
Is it possible to provide this demo project or some another simple test project where the case can be reproduced?

Hi, Alexander,

Thank you for your reply. Please find attached project, it can reproduce the problem on my side.

coman-upload.zip (88.3 KB)

Hi Alexander,

Do you have update for this issue?

Hi, Bryan

Sorry for the delay. Didn’t get notification for your Monday reply for some reason.
Thanks for the project attached and for the reminder.

Just checked the project, the case reproduced. So I will investigate the issue and come back with the results.

Regards,
Alexander

1 Like

First I would like to note that Jmix Studio doesn’t support Spring profiles. So the properties files structure in the provided project is not compatible with Jmix Studio.

Also there is an issue with properties files reading in Studio at the moment. It reads properties from application-{profile}.properties files which is not expected behavior. The YouTrack issue created.
So, when the fix delivered you will need to specify your dev properties in default application.properties file and your application-prod.properties file will be just ignored by Studio.

For now you can specify server.port value in your application-dev.properties file to enable Hot Deploy.

1 Like

Hi Alexander,

Thank you very much for the solution!

For whom might read this post: after adding server.port in dev profile, you need to close the project and reopen it again to let Studio reload project properties, then hot deploy will work.

2 Likes

In this case, do you mean that we cannot use Spring profiles in Jmix app? Because today I noticed Studio can’t detect any data stores in application-dev.properties:
image

Hi Bryan,

Of course you can use Spring profiles in a Jmix application.
But Studio doesn’t know about them and doesn’t show in the tree, because it cannot adequately display all possible variants of properties specified in different profiles.

Just assume that Studio is a dev environment and specify dev properties in default application.properties. Use other profiles for other environments like prod.

1 Like

Thanks Konstantin! This is good point :grinning: