我正在开发一个使用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
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。