gradle appStartDebug
appStartDebug starts web-app inplace, in debug mode.
The web-app gets compiled (if it’s not up-to-date).
Embedded servlet-container starts in separate java process against compiled classes and their dependencies.
important: Upon start, the process is in suspended-mode and listens for debugger commands on port 5005.
Upon resume, servlet-container process starts listening for HTTP-requests on port (default 8080).
Gretty waits for servlet-container process to complete.
Gradle script continues normal execution of tasks.
Note that this task does not depend on "war" task, nor does it use WAR-file.
Note that this task does not stop servlet-container. It is assumed that another gradle process stops it, supposedly gradle appStop.
The object called appStartDebug is actually an instance of AppStartTask class, created and configured for you by Gretty. You can instantiate or even extend this class on your own:
apply plugin: 'org.gretty'
import org.akhikhl.gretty.AppStartTask
task('MyRun', type: AppStartTask) {
// ...
}
class VerySpecialRun extends AppStartTask {
// ...
}
task('MyRun2', type: VerySpecialRun) {
// ...
}
If you are going to instantiate or extend this task class yourself, make sure you’ve learned it’s properties and methods.
See also: appStop task, appRestart task, Debugger support.