2017-06-05 61 views
0

我想使用Gradle編譯Vaadin 7.6.2項目,但編譯widgetset時出現錯誤。使用Gradle編譯Vaadin 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,一切正常。

回答

0

從stacktrace看來,v-leaflet插件取決於g頁面,它看起來不在你的類路徑中。

你可以嘗試添加

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

到您的構建,並看看是否有幫助。