使用Gradle

时间:2017-06-05 10:20:43

标签: gradle gwt widget vaadin vaadin7

我想使用Gradle编译一个Vaadin 7.6.2项目,但是我在编译widgetset时遇到错误。

我正在使用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,一切正常。

1 个答案:

答案 0 :(得分:0)

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

您可以尝试添加

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

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