Closed lucasmontec closed 5 years ago
using gradle:
` repositories { mavenCentral() jcenter() maven { url "http://download.osgeo.org/webdav/geotools/" } maven { url = "http://maven.vaadin.com/vaadin-addons" } }
dependencies {
//VAADIN ADDONS
vaadinCompile 'org.peimari:g-leaflet:+' //For v-leaflet
implementation 'org.vaadin.addon:v-leaflet:+' //For analytics
//UTILS
//implementation group: 'org.reflections', name: 'reflections', version: '0.9.11'
vaadinCompile 'com.fasterxml.jackson.core:jackson-core'
vaadinCompile 'com.fasterxml.jackson.core:jackson-annotations'
vaadinCompile 'com.fasterxml.jackson.core:jackson-databind'
}
`
Completely deleting my widget set broke my app. Downloading my old widgetset from git and placing it at the correct path seems to have worked.
[Edit] Still broken: :processResources :classes :vaadinClassPathJar UP-TO-DATE :vaadinCompileErrors in 'org/vaadin/addon/leaflet/shared/Point.java' Line 37: JsonValue cannot be resolved to a type Line 3: The import com.fasterxml cannot be resolved Aborting compile due to errors in some input files FAILED
Adding jackson to vaadin compile didn't work also. vaadinCompile 'com.fasterxml.jackson.core:jackson-core:2.9.7' vaadinCompile 'com.fasterxml.jackson.core:jackson-annotations:2.9.7'
Adding all jackons dependencies to vaadinCompile didn't work:
vaadinCompile 'com.fasterxml.jackson.core:jackson-databind:2.9.7' vaadinCompile 'com.fasterxml.jackson.core:jackson-core:2.9.7' vaadinCompile 'com.fasterxml.jackson.core:jackson-annotations:2.9.7' vaadinCompile 'org.peimari:g-leaflet:+' //For v-leaflet compile 'org.vaadin.addon:v-leaflet:+' //For map fields
My entire Gradle build file is attached: gradle.build.debug.txt
The project is a spring boot vaadin 8 project.
@johndevs, any idea what might be the issue here?
Running gradle 4.6.
Build time: 2018-02-28 13:36:36 UTC Revision: 8fa6ce7945b640e6168488e4417f9bb96e4ab46c
Groovy: 2.4.12 Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017 JVM: 1.8.0_181 (Oracle Corporation 25.181-b13) OS: Windows 10 10.0 amd64
Have you tried adding the addon on the vaadidnCompile
classpath?
So it would look like this.
// Add addon + its transitive dependencies to GWT compile classpath
vaadinCompile 'org.vaadin.addon:v-leaflet:+'
// Add addon + its transitive dependencies to Java compile classpath
compile 'org.vaadin.addon:v-leaflet:+'
You need to add it to both configurations so it pulls in the transitive dependencies to both classpaths.
@johndevs
Have you tried adding the addon on the
vaadidnCompile
classpath?So it would look like this.
// Add addon + its transitive dependencies to GWT compile classpath vaadinCompile 'org.vaadin.addon:v-leaflet:+' // Add addon + its transitive dependencies to Java compile classpath compile 'org.vaadin.addon:v-leaflet:+'
You need to add it to both configurations so it pulls in the transitive dependencies to both classpaths.
Just did that and it didn't work. Same error:
Task :vaadinClassPathJar Errors in 'org/vaadin/addon/leaflet/shared/Point.java' Line 37: JsonValue cannot be resolved to a type Line 3: The import com.fasterxml cannot be resolved Aborting compile due to errors in some input files Task :vaadinCompile FAILED With:
vaadinCompile 'org.peimari:g-leaflet:+' //For v-leaflet
// Add addon + its transitive dependencies to GWT compile classpath
vaadinCompile 'org.vaadin.addon:v-leaflet:+'
// Add addon + its transitive dependencies to Java compile classpath
compile 'org.vaadin.addon:v-leaflet:+'
@lucasmontec I tried, with my very very limited Gradle skills and I was able to make v-leaflet work fine with plain servlet project. There was some struggle, but I guess that was because of my limited Gradle skills. My build file for the test was simply this (and all worked just fine with a functional war file):
plugins {
id 'com.devsoap.plugin.vaadin' version '1.4.1'
}
dependencies {
vaadinCompile 'org.vaadin.addon:v-leaflet:2.0.9'
}
I don't know how Gradle users resolve/investigate their conflicts so I don't have too many good tips how to resolve the the issue. Does the attached project work for you?
For some divine reason it worked. I removed the g-leaflet dependency, and added only the v-leaflet one. I had tried such before but for some reason it only worked now. I'm using the following config:
vaadinCompile 'org.vaadin.addon:v-leaflet:2.0.9' compile 'org.vaadin.addon:v-leaflet:2.0.9' //NECESSARY TO RUN IN ECLIPSE, adds the dependency to the eclipse classpath config
I had to add the compile directive to run within eclipse, the jar works without it. I have figured that there is a dependencies command for gradle that shows dependencies and transient dependencies. It was quite nice to use.
I really don't know why it wasn't compiling before. I think I may have updated something that fixed it. Anyway, thanks for the support and for the awesome addon!
Everything was working until: :vaadinCompileErrors in 'org/vaadin/addon/leaflet/shared/Point.java' Line 37: JsonValue cannot be resolved to a type Line 3: The import com.fasterxml cannot be resolved
Seems leaftlet uses jackson annotation and that is breaking at the clientside compile time. Something like it. I don't think its v-leaflet fault, but I can't find what is causing this...