Skip to main content



      Home
Home » Modeling » TMF (Xtext) » hot deployment with gradle (hot deployment with gradle in web application)
hot deployment with gradle [message #1839150] Mon, 15 March 2021 19:49 Go to next message
Eclipse UserFriend
Hi,
i have created a DSL web application. I run this application in the command prompt by executing the command "gradlew jettyRun". The problem is that each time i make some minor changes to my code, i have to stop the gradle for saving then. After that i have to start again the jetty. Because it is very time consumable and boring process, is there any way to automate this some-how?

thanks in advance,


[Updated on: Thu, 20 May 2021 10:57] by Moderator

Re: hot deployment with gradle [message #1839152 is a reply to message #1839150] Tue, 16 March 2021 02:15 Go to previous messageGo to next message
Eclipse UserFriend
what happens when you start the serverlauncher main class in the .web project in debug mode from eclipse instead?
Re: hot deployment with gradle [message #1839158 is a reply to message #1839152] Tue, 16 March 2021 03:32 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,

i am using vs code because the only files that i modify, are under the web app folder. Also when running the gradle form the embedded terminal of vscode, i get the same behavior as mentioned in my previous post.


[Updated on: Thu, 20 May 2021 10:57] by Moderator

Re: hot deployment with gradle [message #1839162 is a reply to message #1839158] Tue, 16 March 2021 05:29 Go to previous messageGo to next message
Eclipse UserFriend
Then maybe you have to modify the jetty run script to start in debug mode to see if this will trigger hot code replacement
Re: hot deployment with gradle [message #1839164 is a reply to message #1839162] Tue, 16 March 2021 06:41 Go to previous messageGo to next message
Eclipse UserFriend
in the build.gradle file of my web project i run the jetty as follows :
task jettyRun(type:JavaExec) {
	dependsOn(sourceSets.main.runtimeClasspath)
	classpath = sourceSets.main.runtimeClasspath.filter{it.exists()}
	main = 'eu.test.web.ServerLauncher'
	standardInput = System.in
	group = 'run'
	description = 'Starts an example Jetty server with your language'
}



searching in google i found this url --> https://stackoverflow.com/questions/32329282/hot-code-deployment-in-jetty

what information should i add inside the jettyRun task?
I am a little bit lost.

[Updated on: Thu, 20 May 2021 10:57] by Moderator

Re: hot deployment with gradle [message #1839165 is a reply to message #1839164] Tue, 16 March 2021 07:05 Go to previous message
Eclipse UserFriend
The problem is i have no idea which and how you compile the Java code in
Vscode.

If you use Java extension or gradle in continous Mode
I assume that new class files will be produced

Then if you configure the jetty run task to run in debug mode (i assume the docs on Java task will have some hints on that https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html)
Or you use the Java extension to start the server launcher class in debug mode that then
It should work

[Updated on: Tue, 16 March 2021 07:14] by Moderator

Previous Topic:hot deployment with gradle
Next Topic:Where is cardinality stored in the ecore model?
Goto Forum:
  


Current Time: Fri Jul 04 19:18:49 EDT 2025

Powered by FUDForum. Page generated in 0.03962 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top