Setting up production mode

To run Flow+MPR in production mode you need to update the project as told in Taking your Application into Production.

Note
The flow-server-production-mode dependency sets productionMode=true using a web-fragment.xml that then also reflects to Vaadin 7/8 production mode setting.

Sample production mode profile for MPR

<profile>
    <id>production</id>

    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>flow-server-production-mode</artifactId>
            <version>${flow.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>flow-maven-plugin</artifactId>
                <version>${flow.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>copy-production-files</goal>
                            <goal>package-for-production</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty.version}</version>
                <configuration>
                    <webAppConfig>
                        <resourceBases>
                            <resourceBase>${project.build.directory}/${project.build.finalName}/</resourceBase>
                            <resourceBase>${basedir}/src/main/webapp/</resourceBase>
                        </resourceBases>
                    </webAppConfig>
                </configuration>
            </plugin>
        </plugins>
    </build>
</profile>