Jmix2 - can not perform basic deployment

Hello,
I have started to play with Jmix2 and I like it a lot, but, I can’t deploy the application using Jmix documentation: https://docs.jmix.io/jmix/deployment/basic.html

I’m using IntelliJ Build #IU-232.8660.185, built on July 26, 2023
and Jmix 2.0.1-232 plugin.

  1. Create Jmix project, connect to a database, run with IDE OK
  2. In Jmix Studio, open the Gradle tool window and double-click Tasks → build → bootJar OK
  3. Copy the jar to a Linux server with installed database and JDK, java -jar ERROR

Caused by: java.lang.IllegalStateException: Running project in development mode with no access to folder 'C:\....workspace\jmix2test2'.

Indeed, looking at META-INF/VAADIN/config/flow-build-info.json inside the jar, I can see the references to the filesystem that do not exist.

I’m also aware of
vaadin.productionMode=true
and I presume it needs to be set somewhere, but I just can’t make it work.
I have tried adding it to the application.properties, and also editing build.gradle as described here https://vaadin.com/docs/latest/guide/start/gradle#production but can’t make it work.

Please advise.

Kind regards.
Mladen

So, what I did is I suspected it was the IntelliJ version being too new.

Using this neat tool
https://www.jetbrains.com/toolbox-app/
one can manage various instances and have them co-exist (install the IDE instance through this tool, otherwise, you can’t manage its separate settings) , and I installed 2023.1.5

Then I edited the build.gradle (found under Build Scripts in the Jmix ) and added this at the end

vaadin {
    productionMode = true
}

(edit application.properties under Configuration to reflect database connection parameters etc. if needed)

Under Gradle (View - Tool Windows - Gradle) under Tasks - build execute bootJar
A jar file will be generated under the project folder in /project-name/build/libs/ that you copy to the deployment server under some folder , I have used /opt/project-name
and then use java -jar to start the application

I then went to do the same with the latest 2032.2 and it worked there too.

Kind regards,
Mladen