首页 > 解决方案 > Vaadin 8 与 Vaadin 7 兼容包:Sass 编译器失败

问题描述

我正在做一个使用 Vaadin7 的项目。我使用 pom.xml 中的兼容性将项目从 vaadin 7 转换为 vaadin 8 。我解决了此 vaadin 迁移所需的所有依赖项,但是当我构建项目时,它会抛出 com.vaadin.sass.SassCompiler 错误。

以前的 pom 环境:-

    <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-themes</artifactId>
                <version>7.5.10</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client-compiled</artifactId>
                <version>7.5.10</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client</artifactId>
                <version>7.5.10</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.validation</groupId>
                        <artifactId>validation-api</artifactId>
                    </exclusion>
                </exclusions>
     </dependency>

当前 pom 环境:-

<dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-compatibility-client</artifactId>
            <version>8.7.0</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client</artifactId>
            <version>8.7.0</version>
            <exclusions>
            <exclusion>
                    <groupId>com.google.gwt</groupId>
                    <artifactId>gwt-user</artifactId>
            </exclusion>
            </exclusions>
        </dependency>
        
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-compatibility-client-compiled</artifactId>
            <version>8.7.0</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client-compiled</artifactId>
            <version>8.7.0</version>
        </dependency>
        
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-compatibility-shared</artifactId>
            <version>8.7.0</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-shared</artifactId>
            <version>8.7.0</version>
        </dependency>
        
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-compatibility-themes</artifactId>
            <version>8.7.0</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-themes</artifactId>
            <version>8.7.0</version>
        </dependency>
        
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-compatibility-server</artifactId>
            <version>8.7.0</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-server</artifactId>
            <version>8.7.0</version>
</dependency>

插件环境:-

<plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin.plugin.version}</version>
                <configuration>
                    <!-- <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs> -->
                    <module>com.project.widgetsets.ProjectWidgetSet</module>
                    <webappDirectory>target/classes/VAADIN/widgetsets</webappDirectory>
                    <hostedWebapp>target/classes/VAADIN/widgetsets</hostedWebapp>
                    <noServer>true</noServer>
                    <compileReport>true</compileReport>
                    <style>OBF</style>
                    <strict>true</strict>
                    <runTarget>http://127.0.0.1:8080/</runTarget>
                </configuration>
                <executions>
                    <execution>
                        <configuration></configuration>
                        <goals>
                            <goal>clean</goal>
                            <goal>resources</goal>
                            <goal>update-theme</goal>
                            <goal>update-widgetset</goal>
                            <goal>compile-theme</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
</plugin>

当我尝试使用mvn install命令构建项目时,它给了我以下错误:-

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 53.367 s
[INFO] Finished at: 2019-04-15T18:41:04+05:30
[INFO] Final Memory: 19M/46M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.7.0:compile-theme (default) on project jtservices: Compiling theme "VAADIN\themes\jt-theme" failed: Command [[
[ERROR] C:\Program Files\Java\jdk1.8.0_144\jre\bin\java -Xmx1G com.vaadin.sass.SassCompiler C:\Users\swaga\git\ng\jtb2b\protocols\src\main\resources\VAADIN\themes\jt-theme\styles.scss C:\Users\swaga\git\ng\jtb2b\protocols\src\main\resources\VAADIN\themes\jt-theme\styles.css
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

标签: javamavenvaadin

解决方案


推荐阅读