question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Any way to convince Jetty instance to hot reload when running via gradle?

See original GitHub issue

I am using Gradle and the kotlin and application plugins to start my Javalin app. I would like to convince Gradle and Jetty to watch and build my code, and hot-reload the Jetty server.

I was hoping that Gradle’s “continuous build” feature could be used to trigger rebuilds, and that putting the Jetty server in debug mode might help, but neither of those seem to work. The continuous build seems to be blocked by Jetty taking over the thread, and only works for other commands that “end”, such as my unit tests. Perhaps the debug params will only work with the Gradle jetty plugin?

Anyway, I realize this isn’t really an issue with Javalin itself, but I was hoping someone in the community might have some insight on how I could improve my Javalin setup to allow for hot-reloads.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
tipsycommented, Jul 29, 2018

@PascalLeMerrer For static files you don’t need to restart the server, you can either just build (will copy files to jar), or use enableStaticFiles("/path", Location.EXTERNAL). If you use an external location, all you have to do is save and refresh.

2reactions
PascalLeMerrercommented, Jul 29, 2018

According to me, this would be an important feature to add to Javalin for it to be a nice backend for SPA development

Read more comments on GitHub >

github_iconTop Results From Across the Web

Any way to convince Jetty instance to hot reload when running ...
I would like to convince Gradle and Jetty to watch and build my code, and hot-reload the Jetty server. I was hoping that...
Read more >
best way to enable hot deployment on Jetty when using ...
Use the Gradle eclipse-wtp plugin to generate a WTP2 config, and use Eclipse's "Run AS -> Run on Server". This accomplishes the hot...
Read more >
Micronaut - Reloading using Gradle's Continuous Build
Let's launch the Micronaut CLI using mn command and create a Micronaut application as follows.
Read more >
Why Don't You Use Java for Programming the Client-Side ...
I once used GWT + Electron + Materialize running with Jetty. That worked, but after getting ... Here an example of using Gradle...
Read more >
Spring Framework Reference Documentation
Next we outline the basic steps needed to configure an application that depends on Spring, first with Maven and then with Gradle and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found