首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用Gradle编译Vaadin控件集

用Gradle编译Vaadin控件集
EN

Stack Overflow用户
提问于 2017-06-05 18:20:43
回答 1查看 674关注 0票数 0

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

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

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

代码语言:javascript
复制
...
[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相关部分)的内容:

代码语言:javascript
复制
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,一切都运行得很好。

EN

回答 1

Stack Overflow用户

发布于 2017-06-11 22:20:15

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

您可以尝试添加

代码语言:javascript
复制
compile group: 'org.peimari', name: 'g-leaflet', version: '1.0.4'

添加到您的构建中,看看它是否有帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44366780

复制
相关文章

相似问题

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