Java 使用vaadin 7.3和valo主题编译我的主题时出错

Java 使用vaadin 7.3和valo主题编译我的主题时出错,java,vaadin,vaadin7,Java,Vaadin,Vaadin7,我正在开发一个使用vaadin v7.2的vaadin应用程序。现在它更新为v7.3.7,并将新的valo主题与我的自定义样式一起使用。使用mvn clean install编译整个项目时,主题得到了完美的编译。但是当我尝试使用命令提示符和下面的命令编译主题时 java -cp '../../../../../../target/product-webapp-1.1.3.0-SNAPSHOT/WEB-INF/lib/*' com.vaadin.sass.SassCompiler styles.s

我正在开发一个使用vaadin v7.2的vaadin应用程序。现在它更新为v7.3.7,并将新的valo主题与我的自定义样式一起使用。使用
mvn clean install
编译整个项目时,主题得到了完美的编译。但是当我尝试使用命令提示符和下面的命令编译主题时

java -cp '../../../../../../target/product-webapp-1.1.3.0-SNAPSHOT/WEB-INF/lib/*' com.vaadin.sass.SassCompiler styles.scss styles.css
它推送一个valo not found错误,如下所示

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>

com.vaadin
瓦丁客户机
${com.vaadin.version}
假如


com.vaadin
vaadin客户端编译器
${com.vaadin.version}
假如

在pom.xml中,用于valo自定义主题

在mytheme.scss中,不要忘记在mixin子句之前添加@before,否则编译失败。Liferay用于更改文本字段外观的变量:

// Import valo after setting the parameters
@import "../liferay/liferay.scss";
@import "../valo/valo.scss";


@mixin mytheme {
  @include liferay;
  @include valo;

.v-textfield.height-fix {
    height: 35px;
    border-radius: 4px;
  }
}
我将valo主题直接复制到我的项目中。styles.scs应如下所示(即完全相同):

对于您的主要问题,为什么编译在包含的valo主题上失败,我没有简单的答案。对于Eclipse Mars、Liferay 6.2.4和Vaadin 7.5,此错误(对于新安装)不会出现。此外,将valo主题直接复制到实际项目中以实现这种实际组合是过时的

// Import valo after setting the parameters
@import "../liferay/liferay.scss";
@import "../valo/valo.scss";


@mixin mytheme {
  @include liferay;
  @include valo;

.v-textfield.height-fix {
    height: 35px;
    border-radius: 4px;
  }
}
@import "addons.scss";
@import "mytheme.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 {
    //Your theme's rules go here
  @include addons;
  @include mytheme;
}