I am seeing developers building their Vaadin application locally in production mode, in order to verify the packaging and spring-boot configuration processing etc. So they execute mvn -Pproduction clean install. Once done, they go back to IntelliJ - using the Vaadin plugin - and do ‘Debug using HotswapAgent’. But when the application then starts, it is started in production mode, as can be seen in the logs.
Is this intended ? It seems that to be able to restart in development mode, mvn com.vaadin:vaadin-maven-plugin:24.6.5:dance is needed first. Would it make sense that the IntelliJ plugin does the necessary behind the scenes instead to ensure that the application is started in development mode? Adding to the confusion sometimes, hotswapping java classes does work like that in production mode, but not hotswapping css.
I’m trying to distill a uniform developer workflow out of all this, so that when they get stuck with hotswap they can drag themselves out. To that extent, the full page refresh that used to happen when reloading code was a great indicator that things were working.
Looking closer, I think the issue is with mvnd , which keeps maven instances around for faster startup. Those jvm’s don’t exit, hence the file is not deleted.
There may be other scenario’s where the tokenfile (flow-build-info.json) is present when the intelliJ plugin executes. Perhaps it should just attempt to detect and remove it before it runs?
Do you mind creating a ticket for this case where JVM does not exit?
Perhaps this can be fixed in the maven plugin itself, by forcing the file deletion in a try/finally block instead of using the deleteOnExit method.