Maven Vaadin:未能加载widgetset.nocache.js
我正在使用Vaadin 6.8.2和Maven开发一个应用程序 我已尝试通过以下链接中的教程逐步将日历加载项(1.3.0-Vaadin 6的版本)添加到我的项目中: 但是,当我尝试在浏览器中加载应用程序时,出现以下错误:Maven Vaadin:未能加载widgetset.nocache.js,maven,gwt,vaadin,add-on,Maven,Gwt,Vaadin,Add On,我正在使用Vaadin 6.8.2和Maven开发一个应用程序 我已尝试通过以下链接中的教程逐步将日历加载项(1.3.0-Vaadin 6的版本)添加到我的项目中: 但是,当我尝试在浏览器中加载应用程序时,出现以下错误: Failed to load the widgetset: /myproject/VAADIN/widgetsets/my.company.ProjectWidgetSet/my.company.ProjectWidgetSet.nocache.js 如果我查看控制台,我会看
Failed to load the widgetset: /myproject/VAADIN/widgetsets/my.company.ProjectWidgetSet/my.company.ProjectWidgetSet.nocache.js
如果我查看控制台,我会看到:
INFO: Requested resource [VAADIN/widgetsets/my.company.ProjectWidgetSet/my.company.ProjectWidgetSet.nocache.js] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
你遇到过类似的问题吗?
有什么帮助吗?:) 您需要编译widgetset。要启用它,您的pom中需要类似的内容:
<!-- vaadin update widgetset step 1: need (re)build? -->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- vaadin update widgetset part 2: compile -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.3.0-1</version>
<configuration>
<webappDirectory>src/main/webapp/VAADIN/widgetsets</webappDirectory>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<runTarget>clean</runTarget>
<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
<noServer>true</noServer>
<port>8080</port>
<soyc>false</soyc>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
com.vaadin
vaadin maven插件
1.0.2
更新WidgeSet
org.codehaus.mojo
GWTMaven插件
2.3.0-1
src/main/webapp/VAADIN/widgetsets
-Xmx512M-Xss1024k
清洁的
${project.build.directory}/${project.build.finalName}
真的
8080
假的
资源
编译
安装到位后,重新编译应用程序。在您提供的链接之后,您将看到类似于第15.5.3章所述的内容。编译widgetset需要一些时间,因此它不能不被注意
您还需要一个ProjectWidgetSet.gwt.xml和在web.xml中对它的引用,但是由于您收到的错误消息已经提到ProjectWidgetSet(与DefaultWidgetset相反),我猜你已经这么做了。我遇到了同样的问题“无法加载WidgeSet:”当我试图从svn获取数据来运行Vernotologist演示应用程序时,出现了这个问题。要解决这个问题:
这是一条古老的线索,但在较新版本的Vaadin(7.x.x)中,解决方案大不相同。不需要GWT插件:
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets</webappDirectory>
<hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets</hostedWebapp>
<noServer>true</noServer>
<draftCompile>false</draftCompile>
<style>OBF</style>
<compileReport>true</compileReport>
<runTarget>http://localhost:8080/</runTarget>
<widgetsetMode>cdn</widgetsetMode>
</configuration>
<executions>
<execution>
<goals>
<goal>compile-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
com.vaadin
vaadin maven插件
-Xmx512M-Xss1024k
${basedir}/src/main/webapp/VAADIN/widgetsets
${basedir}/src/main/webapp/VAADIN/widgetsets
真的
假的
OBF
真的
http://localhost:8080/
cdn
编译主题
更新WidgeSet
编译
另外,在编译上述内容之前,请确保您的ProjectWidgetSet.gwt.xml位于resources/my/company/folder中。我遇到了同样的问题“加载widgetset.nocache.js失败”,但我通过重新安装“vaadin”插件解决了这个问题
步骤:
1) 帮助->eclipse market place->搜索vaadin->(如果已经安装)卸载它,然后单击“已安装”按钮再次安装它
2) 重新编译项目并运行它我不明白。我在pom.xml文件中声明了类似的插件(因为我使用vaadin原型创建了项目),我还在web.xml文件中声明和引用了custom.gwt.xml文件,但它不起作用。但是,我复制了您对pom.xml的声明。。而且成功了。。感谢阿特莫花时间帮助我!我很感激:)