Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Enable productionMode via Maven build
Hello,
is it possible to enable productionMode in Maven buidl?
By now i found out only following to enable productionMode:
* web.xml -> context-param or inti-param
* code -> @VaadinServletConfiguration(productionMode = false)
Note: I cann't find any online documentation for "vaadin-maven-plugin" :( I expected somohow, that this plugin could do this job.
Hi,
I didn't try, but found some alternatives:
- Use multiple web.xml files and the maven-war-plugin as described here.
- Launch the application using a Maven plugin that supports setting system properties (e.g. jetty-maven-pluggin), defining one of such properties, programatically reading that property, and seting the production mode as described here.
- Use Filtering to process web.xml.
You will probably want to use Maven variables and profiles with the previous methods.
Hi,
thank you for your answer.
I solved this using Filtering in web.xml (point 3.).
Using Maven Profiles (1. point) is also quite interesting .
... but i would still expect that Vaadin Maven plugin can do this and there is no need to do somev Maven tricks.
BR,
Lubos