使用vaadin 7.3和valo主题编译主题时出错
作者:互联网
我正在开发一个使用vaadin v7.2的vaadin应用程序.现在它更新到v7.3.7并使用我的自定义样式的新valo主题.使用mvn clean编译整个项目时,主题得到完美编译.但是当我尝试使用命令提示符下面的命令编译主题时
java -cp '../../../../../../target/product-webapp-1.1.3.0-SNAPSHOT/WEB-INF/lib/*' com.vaadin.sass.SassCompiler styles.scss styles.css
它推出了一个未找到的valo错误,如下所示
java.io.FileNotFoundException: Import '../valo/valo.scss' in '/home/lahirub/Documents/PROJECTS/NewClearProduct/newclear-product-webapp/src/main/webapp/VAADIN/themes/mytheme/styles.scss' could not be found
com.vaadin.sass.internal.parser.ParseException: Mixin Definition: valo not found
我的自定义主题是这样的
mytheme.scss
@import "../valo/valo.scss";
@mixin mytheme {
@include valo;
// Insert your own theme rules here
}
styles.scss
@import "mytheme.scss";
@import "addons.scss";
// This file prefixes all rules with the theme name to avoid causing conflicts with other themes.
// The actual styles should be defined in mytheme.scss
.mytheme {
@include addons;
@include mytheme;
}
addons.scss
/* Import and include this mixin into your project theme to include the addon themes */
@mixin addons {
}
我无法找到此错误的原因.任何人都可以给我一些建议.
解决方法:
我刚刚找到了解决方案.需要更换
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
<version>${com.vaadin.version}</version>
<scope>provided</scope>
</dependency>
同
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<version>${com.vaadin.version}</version>
<scope>provided</scope>
</dependency>
在pom.xml中为valo自定义主题.
标签:java,vaadin,vaadin7 来源: https://codeday.me/bug/20190609/1206374.html