首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >正在使用的微件集似乎不是为正在使用的Vaadin版本构建的

正在使用的微件集似乎不是为正在使用的Vaadin版本构建的
EN

Stack Overflow用户
提问于 2017-04-05 18:54:57
回答 2查看 2.6K关注 0票数 1

我想将Vaadin图表添加到我的项目中,我已经添加了maven依赖,安装许可证和vaadin干净,更新部件集和编译。但当我运行应用程序并打开localhost:8080时,在控制台中出现错误:

代码语言:javascript
复制
The widgetset in use does not seem to be built for the Vaadin
version in use. This might cause strange problems - a
recompile/deploy is strongly recommended.
Vaadin version: 8.0.0
Widgetset version: 8.0-SNAPSHOT

并在UI上显示以下消息:https://www.screencast.com/t/deDF6kVsvDdU

下面是我的pom.xml中的vaadin依赖项:

代码语言:javascript
复制
<dependencies>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-spring-boot-starter</artifactId>
        <version>2.0.0</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-charts</artifactId>
        <version>4.0.0</version>
    </dependency>
</dependencies>


<repositories>
    <repository>
        <id>vaadin-addons</id>
        <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>
</repositories>

<build>
    <plugins>
        <plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <version>8.0.4</version>
            <configuration>
                <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
                <draftCompile>false</draftCompile>
                <compileReport>false</compileReport>
                <style>OBF</style>
                <strict>true</strict>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>update-theme</goal>
                        <goal>update-widgetset</goal>
                        <goal>compile</goal>
                        <goal>compile-theme</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

我该如何解决这个问题呢?

更新:以下是mvn vaadin:clean vaadin:compile的输出(运行此命令并不能解决我的问题):

代码语言:javascript
复制
[INFO] --- vaadin-maven-plugin:8.0.4:clean (default-cli) @ test ---
[WARNING] GWT plugin is configured to detect modules, but none were found.
[INFO]
[INFO] --- vaadin-maven-plugin:8.0.4:compile (default-cli) @ test ---
[WARNING] GWT plugin is configured to detect modules, but none were found.
[INFO] Using com.vaadin:vaadin-client version 8.0.0
[INFO] Using com.vaadin:vaadin-client-compiler version 8.0.0
[INFO] ---------------------------------------------------------------------
[INFO] BUILD SUCCESS 

我还尝试向VaadinUI类添加注释@Widgetset("AppWidgetset")并重新编译,这一次我在UI上遇到错误:

代码语言:javascript
复制
Failed to load the widgetset: ./VAADIN/widgetsets/AppWidgetset/AppWidgetset.nocache.js?

因此,我在VaadinUi类附近添加了WidgetSet.gwt.xml:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<module>
    <inherits name="com.vaadin.DefaultWidgetSet" />
    <inherits name="com.vaadin.addon.charts.Widgetset" />
</module>

重新编译所有代码,但仍然会得到

代码语言:javascript
复制
 Failed to load the widgetset: ./VAADIN/widgetsets/AppWidgetset/AppWidgetset.nocache.js?
EN

回答 2

Stack Overflow用户

发布于 2017-04-11 12:49:07

添加vaadin客户端dep

代码语言:javascript
复制
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client</artifactId>
    <scope>provided</scope>
</dependency>
票数 5
EN

Stack Overflow用户

发布于 2018-02-03 18:10:01

我的POM如下,它起作用了。正常的构建命令:mvn package。只需要编译一次小部件,所以当你构建你的应用程序时删除插件,以减少编译时间。要编译的VAADIN文件夹位于:\src\main\webapp\VAADIN

代码语言:javascript
复制
<!-- Only support to compile Vaadin widgetsets -->
   .......
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client</artifactId>
        <scope>provided</scope>
        <version>8.2.0</version>
    </dependency>
       .....
       <plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <version>8.2.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>update-theme</goal>
                        <goal>update-widgetset</goal>
                        <goal>compile</goal>
                        <goal>compile-theme</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43229136

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档