Vaadin with Spring and Gradle in Production

I’m not able to build a Vaadin + Spring Boot in production mode.
Using ./gradlew clean build -Pvaadin.productionMode as described in the README of the skeleton project on github fails with:

FAILURE: Build failed with an exception.

* What went wrong:
Task '.productionMode' not found in root project 'project-name'.

Using gradle 7.5.1 & 7.3

I have had issues like this in the past but not likely. I suspect there were issues with the Gradle plug-in that may now be resolved. What version of the plug-in and version of Vaadin are you using?

Using vaadin 23.2.8

Surprisingly, using IntelliJ’s Gradle Run Configuration, it works fine and in the GitLab CI/CD it works also fine. But not via Command-Line

you are using windows (maybe powershell/terminal). try “-Pvaadin.productionMode”

Thank you! I was thinking about somehow escaping the flag but I didn’t knew how. Working now on PS