当我设置vaadin productionMode = true

时间:2016-02-17 13:47:52

标签: vaadin

当我在我的Vaadin 7应用程序中设置productionMode = true时,布局和样式会丢失,为什么会这样?

1 个答案:

答案 0 :(得分:1)

解决方案是在<goal>compile-theme</goal>

中发表评论
<plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <version>${vaadin.plugin.version}</version>
            <configuration>
                <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
                <draftCompile>false</draftCompile>
                <compileReport>false</compileReport>
                <style>OBF</style>
                <strict>true</strict>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>update-theme</goal>
                        <goal>update-widgetset</goal>
                        <goal>compile</goal>
                        <!-- disabled by default to use on-the-fly theme compilation -->
                        <goal>compile-theme</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>