如何在 Vaadin 中强制编译小部件集?

发布于 2024-10-22 02:05:15 字数 1610 浏览 9 评论 0原文

我正在尝试在我的应用程序中使用迷你图添加。但是,Eclipse 系统地拒绝编译相应的小部件集,即,如果我在小部件集中指定引用迷你图小部件集的 inherit 标记,如下所示:

<inherits name="org.vaadin.artur.icepush.IcepushaddonWidgetset" />
<inherits name="org.vaadin.hezamu.googlemapwidget.widgetset.GooglemapwidgetWidgetset" />
<inherits name="org.vaadin.sparklines.SparklinesWidgetset" />
<inherits name="com.fluxtream.widgets.FluxtreamwidgetsWidgetset" />

...eclipse 抱怨以下错误:

Loading inherited module 'com.fluxtream.widgets.FluxtreamwidgetsWidgetset'
   Loading inherited module 'com.fluxtream.dashboard.widgetset.FlxDashboardWidgetset'
      Loading inherited module 'org.vaadin.sparklines.SparklinesWidgetset'
         [ERROR] Unable to find 'org/vaadin/sparklines/SparklinesWidgetset.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
      [ERROR] Line 26: Unexpected exception while processing element 'inherits'

但是,我已经验证该小部件集确实在我的项目的 pom 中声明为依赖项,并且我还验证了它出现在 eclipse IDE 中的“Maven Dependencies”库图标下。

另外,每当我尝试重新编译我的 widgetset,并在显示上述错误后,我可以看到我的原始 widgetset.gwt.xml 文件已被修改,结果如下所示:

<inherits name="org.vaadin.artur.icepush.IcepushaddonWidgetset" />
<inherits name="org.vaadin.hezamu.googlemapwidget.widgetset.GooglemapwidgetWidgetset" />

<inherits name="com.fluxtream.widgets.FluxtreamwidgetsWidgetset" />


<inherits name="com.fluxtream.dashboard.widgetset.FlxDashboardWidgetset" />

我真的很困惑,因为我不明白我做错了什么。我正在使用其他工作正常的附加组件(icepush 和 googlemap),我真的不明白我在这里做错了什么。

I am trying to use the sparklines add on in my application. However, eclipse systematically refuses to compile the corresponding widgetset, i.e. if I specify the inherit tag in my widgetset that refers to the sparklines widgetset as follows:

<inherits name="org.vaadin.artur.icepush.IcepushaddonWidgetset" />
<inherits name="org.vaadin.hezamu.googlemapwidget.widgetset.GooglemapwidgetWidgetset" />
<inherits name="org.vaadin.sparklines.SparklinesWidgetset" />
<inherits name="com.fluxtream.widgets.FluxtreamwidgetsWidgetset" />

...eclipse complains with the following error:

Loading inherited module 'com.fluxtream.widgets.FluxtreamwidgetsWidgetset'
   Loading inherited module 'com.fluxtream.dashboard.widgetset.FlxDashboardWidgetset'
      Loading inherited module 'org.vaadin.sparklines.SparklinesWidgetset'
         [ERROR] Unable to find 'org/vaadin/sparklines/SparklinesWidgetset.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
      [ERROR] Line 26: Unexpected exception while processing element 'inherits'

However, I have verified that the widgetset was indeed declared as a dependency in my project's pom, and I have also verified that it appears under the "Maven Dependencies" library icon in the eclipse IDE.

Also, whenever I attempt to recompile my widgetset, and after the aforementioned error is displayed, I can see that my original widgetset.gwt.xml file has been modified, and as a result would look as follows:

<inherits name="org.vaadin.artur.icepush.IcepushaddonWidgetset" />
<inherits name="org.vaadin.hezamu.googlemapwidget.widgetset.GooglemapwidgetWidgetset" />

<inherits name="com.fluxtream.widgets.FluxtreamwidgetsWidgetset" />


<inherits name="com.fluxtream.dashboard.widgetset.FlxDashboardWidgetset" />

I'm really confused, as I don't understand what I am doing wrong. I am using other add-ons which work just fine (icepush and googlemap) and I really don't understand what I am doing wrong here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

﹏半生如梦愿梦如真 2024-10-29 02:05:15

Vaadin Eclipse 插件管理您的 gwt.xml,这就是为什么如果您从类路径添加/删除附加组件,它会被修改。
基本上,这意味着如果在 Eclipse 中工作,则不必手动修改 gwt.xml。此外,Eclipse 插件不知道任何关于 maven(或 pom 文件)的信息,其中的任何信息都不会影响它。

您可以通过两种方式编译小部件集。首先使用 Eclipse 插件(工具栏上的按钮)或使用 Maven。这听起来像是你正在混合这些。

最简单的设置是将所有附加 jar 放入 WEB-INF/lib 并使用 eclipse 插件来编译小部件集。 gwt.xml 应该自动更新,但有时需要刷新(或 jar 删除/添加过程)才能让插件注意到更改。

另外,检查项目首选项中的 Vaadin 设置是否符合您的要求。

The Vaadin Eclipse plugin manages your gwt.xml, that is why it is modifies if you add/remove add-on from classpath.
Basically this means that you don't have to modify the gwt.xml by hand, if working in Eclipse. Furthermore, the Eclipse plugin does not know anything about maven (or pom files) and any information in those does not affect to it.

You can compile the widgetset two ways. First with the Eclipse plugin (the button on toolbar) or with maven. This sounds that you are mixing those.

Easiest setup is to put all add-on jars to WEB-INF/lib and use the eclipse plugin to compile the widgetset. The gwt.xml should be automatically updated, but sometimes a refresh (or jar remove/add procedure) is needed to let the plugin notice change.

Also, check the Vaadin settings in project preferences are the way you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文