You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have seen similar issues being discussed as early as 2018 but hear me out, I have a simple (essentially an empty sample Flow based project, generated by intellij vaadin plugin template (gradle based). And once I add 2 more dependencies, whole dev mode breaks - vital flow dev mode scripts and resources are not present on the page. Again, this is vanilla 'hello world' project. By comparing broken vs working logs, this line stands out:
[ main] c.v.f.s.f.s.FullDependenciesScanner : Visited 2 classes. Took 11 ms.
when things are working it would say Visited 89 classes or so.
After spending 2 more days in debugger, I found out that this break is triggered by path shortening mechanism used by bootRun task in gradle and also if you try and run using intellij with path shortening. The thing is, vaadin relies on spring boot package scanning which at some point calls org.springframework.core.io.support.PathMatchingResourcePatternResolver#getClassPathManifestEntriesFromJar which can't handle absolute path names in jars manifest. This is actually congruent with how JRE itself treats manifest classpath (relative by design). However gradle bootRun and intellij direct 'application' run both have to use absolute paths in classpath jar manifest. I am not sure how spring boot community lives with this bug, but for vaadin on windows, this is complete deal breaker due to humongous amount of dependencies for vaadin dev mode.
Expected behavior
The sample application should load fully. Developer tools and vaadin button should be present in development mode.
Minimal reproducible example
Using intellij (latest version, as described in versions) with vaadin plugin installed, generate Flow based, Gradle based starter project.
open build.gradle and add 1-5 more dependencies (transitive dependencies matter). For me, this single dependency did the trick (add maven { setUrl("https://repo.spring.io/snapshot") } repo)
Description of the bug
I have seen similar issues being discussed as early as 2018 but hear me out, I have a simple (essentially an empty sample Flow based project, generated by intellij vaadin plugin template (gradle based). And once I add 2 more dependencies, whole dev mode breaks - vital flow dev mode scripts and resources are not present on the page. Again, this is vanilla 'hello world' project. By comparing broken vs working logs, this line stands out:
[ main] c.v.f.s.f.s.FullDependenciesScanner : Visited 2 classes. Took 11 ms.
when things are working it would say Visited 89 classes or so.
After spending 2 more days in debugger, I found out that this break is triggered by path shortening mechanism used by bootRun task in gradle and also if you try and run using intellij with path shortening. The thing is, vaadin relies on spring boot package scanning which at some point calls org.springframework.core.io.support.PathMatchingResourcePatternResolver#getClassPathManifestEntriesFromJar which can't handle absolute path names in jars manifest. This is actually congruent with how JRE itself treats manifest classpath (relative by design). However gradle bootRun and intellij direct 'application' run both have to use absolute paths in classpath jar manifest. I am not sure how spring boot community lives with this bug, but for vaadin on windows, this is complete deal breaker due to humongous amount of dependencies for vaadin dev mode.
Expected behavior
The sample application should load fully. Developer tools and vaadin button should be present in development mode.
Minimal reproducible example
Using intellij (latest version, as described in versions) with vaadin plugin installed, generate Flow based, Gradle based starter project.
open build.gradle and add 1-5 more dependencies (transitive dependencies matter). For me, this single dependency did the trick (add
maven { setUrl("https://repo.spring.io/snapshot") }
repo)load the sample page. you will see majority of it is not rendered, vaadin tools button / control is absent.
Versions
The text was updated successfully, but these errors were encountered: