san*_*tos 7 java resources themes vaadin vaadin7
我在src/main/webapp/VAADIN/themes/mytheme /我的VAADIN应用程序中有自定义主题,文件为mytheme.scss和styles.scss.当weba中的vaadin productionMode部署参数设置为false时,一切正常.当我将参数设置为true时,突然Vaadin无法找到我主题的资源并继续抱怨:
Requested resource [/VAADIN/themes/mytheme/styles.css] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder
Run Code Online (Sandbox Code Playgroud)
我没有/ WebContent目录,而是/ webapp,因为它是一个maven web-app项目.我尝试将VAADIN文件夹放到:
src/main/resources
src/main/webapp
src/main/webapp/WEB-INF
但没有什么适用于生产模式.有什么药物吗?提前感谢您的帮助.
Geo*_*ber 13
您需要将以下目标添加到pom.xml,它将.scss文件编译为.css文件:
<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/heijunka/styles.scss</argument>
<argument>src/main/webapp/VAADIN/themes/heijunka/styles.css</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
资料来源:http://dev.vaadin.com/ticket/10291
| 归档时间: |
|
| 查看次数: |
9121 次 |
| 最近记录: |