gradle - 使用 Gradle 编译 Vaadin 小部件集

标签 gradle gwt widget vaadin vaadin7

我想使用 Gradle 编译 Vaadin 7.6.2 项目,但编译小部件集时出现错误。

我正在使用 1.1.11 fi.jasoft.plugin.vaadin 的版本插入。 AppWidgetset.gwt.xml文件位于 src/main/resources文件夹。

查看日志文件,似乎问题与v-leaflet有关模块:

...
[INFO] Compiling module AppWidgetset
[INFO] Tracing compile failure path for type 'org.vaadin.addon.leaflet.client.LeafletRectangleConnector'
[ERROR] Errors in 'jar:file:/C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.vaadin.addon/v-leaflet/1.0.0-rc2/904f6ddbeebaa8136472941911bc214bebeb1dc5/v-leaflet-1.0.0-rc2.jar!/org/vaadin/addon/leaflet/client/LeafletRectangleConnector.java'
[ERROR] Line 17: No source code is available for type org.peimari.gleaflet.client.Layer; did you forget to inherit a required module?
[ERROR] Line 22: No source code is available for type org.peimari.gleaflet.client.Polygon; did you forget to inherit a required module?
[ERROR] Line 22: No source code is available for type org.peimari.gleaflet.client.PolylineOptions; did you forget to inherit a required module?
[ERROR] Line 26: No source code is available for type org.peimari.gleaflet.client.LatLngBounds; did you forget to inherit a required module?
...

以下是 build.gradle 的内容(vaadin 相关部分):
plugins {
   ...
   id "fi.jasoft.plugin.vaadin" version "1.1.11"
}
...

dependencies {
...
compile group: 'com.vaadin', name: 'vaadin-spring-boot-starter', version:'1.0.0'
compile group: 'org.vaadin.spring.extensions', name: 'vaadin-spring-ext-core', version:'0.0.7.RELEASE'
compile group: 'org.vaadin.spring.extensions', name: 'vaadin-spring-ext-boot', version:'0.0.7.RELEASE'
compile group: 'org.vaadin.spring.extensions', name: 'vaadin-spring-ext-security', version:'0.0.7.RELEASE'
compile group: 'org.vaadin.spring.addons', name: 'vaadin-spring-addon-i18n', version:'0.0.7.RELEASE'
compile group: 'org.vaadin.spring.addons', name: 'vaadin-spring-addon-eventbus', version:'0.0.7.RELEASE'
compile group: 'org.vaadin', name: 'viritin', version:'1.44'

compile group: 'org.vaadin.addon', name: 'v-leaflet', version:'1.0.0-rc2'

compile(group: 'org.vaadin.addons', name: 'v-leaflet-markercluster', version:'1.0.0-b2') {
    exclude(group: 'org.vaadin.addon', module: 'v-leaflet')
}
compile(group: 'org.vaadin.addon', name: 'v-leaflet-heat', version:'0.4') {
    exclude(group: 'org.slf4j', module: 'slf4j-simple')
    exclude(group: 'org.vaadin.addon', module: 'v-leaflet')
}

compile group: 'org.vaadin.addons', name: 'filteringtable', version:'0.9.15.v7'
compile group: 'com.vaadin.addon', name: 'vaadin-charts', version:'3.0.0'
compile group: 'com.vaadin.addon', name: 'vaadin-context-menu', version:'0.7.2'
compile group: 'org.vaadin.addons', name: 'vaadin-sliderpanel', version:'1.3.0'
compile group: 'eu.maxschuster', name: 'vaadin-autocompletetextfield', version:'1.0-alpha-4'
compile group: 'com.vaadin.addon', name: 'tableexport-for-vaadin', version:'1.6.2'
compile group: 'org.vaadin.teemu', name: 'switch', version:'2.0.3'
...
}
...

vaadin {  
   version '7.6.2'
}

我不知道为什么会发生错误,以前我使用的是 maven 并且一切正常。

最佳答案

从堆栈跟踪看来,v-leaflet 插件依赖于 g-leaflet,它似乎不在您的类路径中。

你可以尝试添加

compile group: 'org.peimari', name: 'g-leaflet', version: '1.0.4'

到你的构建,看看它是否有帮助。

关于gradle - 使用 Gradle 编译 Vaadin 小部件集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44366780/

相关文章:

GWT:如何在单击时禁用 anchor 链接事件

git - 是否有一个小部件可以在 Windows 资源管理器中显示 git 目录的当前分支?

gradle - maven 或 gradle : how to find the dependencies developer/provider(s)

android - gradle无法正常工作

android - Proguard 重复 Zip 条目

GWT CellTable 以编程方式选择 CheckBoxCell

java - 在 GXT 3.0 中合并值(value)提供者

python - 从 Django 的 TextArea 小部件中删除标签

c - gtk。我怎样才能通过id获取小部件?

java - Gradle : How to run tests from a module dependency?