在Grails上使用Vaadin7,我面临着使生产模式正常工作的问题:
Dec 25, 2013 11:56:28 PM com.vaadin.server.VaadinServlet serveOnTheFlyCompiledScss
INFO: Request for /VAADIN/themes/app/styles.css not handled by sass compiler while in production mode
这是正常现象,因为默认情况下,与dev模式不同,prod不会默认将pross的scss编译器设置为CSS。
我正在寻找一个grails hack,以获取与生产prod war 所需的maven工具相当的功能:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<classpathScope>compile</classpathScope>
<mainClass>com.vaadin.sass.SassCompiler</mainClass>
<arguments>
<argument>src/main/webapp/VAADIN/themes/app/styles.scss</argument>
<argument>src/main/webapp/VAADIN/themes/app/styles.css</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
最佳答案
我增加了对SASS编译的支持。从7.1.9.1插件版本开始可用。在产品环境中运行war命令时,它将下载所需的库并执行SASS编译。只需运行“grails prod war”,它将运行编译。 More info in this tutorial。
关于grails - grails:生产环境所需的scss编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20777850/