Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 23:49 Go to next message
z232 I is currently offline z232 IFriend
Messages: 48
Registered: February 2016
Member
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 14:57]

Report message to a moderator

Re: hot deployment with gradle [message #1839152 is a reply to message #1839150] Tue, 16 March 2021 06:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
what happens when you start the serverlauncher main class in the .web project in debug mode from eclipse instead?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: hot deployment with gradle [message #1839158 is a reply to message #1839152] Tue, 16 March 2021 07:32 Go to previous messageGo to next message
z232 I is currently offline z232 IFriend
Messages: 48
Registered: February 2016
Member
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 14:57]

Report message to a moderator

Re: hot deployment with gradle [message #1839162 is a reply to message #1839158] Tue, 16 March 2021 09:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Then maybe you have to modify the jetty run script to start in debug mode to see if this will trigger hot code replacement

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: hot deployment with gradle [message #1839164 is a reply to message #1839162] Tue, 16 March 2021 10:41 Go to previous messageGo to next message
z232 I is currently offline z232 IFriend
Messages: 48
Registered: February 2016
Member
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 14:57]

Report message to a moderator

Re: hot deployment with gradle [message #1839165 is a reply to message #1839164] Tue, 16 March 2021 11:05 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 16 March 2021 11:14]

Report message to a moderator

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


Current Time: Thu Apr 25 08:11:19 GMT 2024

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

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

Back to the top