I am trying to get a small test project to work using embedded jetty, gradle, and Vaadin 14. This is part of our effort to port our vaadin 8 application which already uses embedded jetty.
When I build and run using embedded jetty and open localhost:8080 I see a directory of files provided by jetty instead of the vaadin app which should show “Does it work?”
gradle vaadinPrepareFrontend
gradle fatJar
java -jar ./build/libs/all-in-one-jar.jar
Open http://localhost:8080 in browser and you see a directory of files. What you should see is
a button which says “Does it work?”
It works if I launch via gjetty gradle plugin which bypasses the embedded jetty code:
gradle appRun
As a side note running “gradle vaadinBuildFrontend” never finishes. I have to kill it off after 10-15 minutes. That is perhaps a gradle vaadin plugin bug.
Hi, thank you for posting and I’m happy that you were able to resolve the issue.
The Could not navigate to '' message and the Available routes: message tells you that no @Route-annotated classes have been found on your classpath. You correctly worked around this issue by adding build\classes\java\main to the classpath.
Martin Vyšný:
Hi, thank you for posting and I’m happy that you were able to resolve the issue.
The Could not navigate to '' message and the Available routes: message tells you that no @Route-annotated classes have been found on your classpath. You correctly worked around this issue by adding build\classes\java\main to the classpath.
I have exactly the same problem with Visual Code Studio which is based on BuildShip too.
Could you tell me where I have to add the build\classes\java\main path ?
There’s a configuration to set in the gradle.build file ?
I found a solution to this problem and I am now able to use Visual Studio Code with Vaadin, Gradle and a Jetty embedded.
The short answer is that you have to add this configuration in the gradle build file: