Fast reload

There are cases, when restart of the web-app on every resource change is not optimal (too slow). Specifically for such cases Gretty implements "fast reload" feature.
Fast reload handles changes in src/main/webapp directory: whenever some files within this directory are changed, these files are copied into running web-app without web-app restart.

When set to false, fast reload feature is disabled. Effect: any resource changes will cause full restart of web-app (as far as scanInterval is set to non-zero, see Hot deployment).

When set to true (the default), webAppDir folder (which is typically src/main/webapp) is set as being fast-reloaded.
That means: whenever some files within webAppDir are changed, these files are copied into running web-app without web-app restart.

fastReload function(String) or function(java.io.File). The specified directory or file is added to fast-reloaded resources.

"baseDir" is required and should have type String or java.io.File. If baseDir represents a relative path, gretty tries to find corresponding existing folder in the following directories:

"$project.projectDir"

"$project.webAppDir"

"$project.buildDir/classes/main"

"$project.buildDir/resources/main"
each resolved subfolder within these folders is added to fast reload.

"pattern" is optional and should have type String or java.util.regex.Pattern.

If "pattern" is not specified, then all files within baseDir are fast-reloaded.

If "pattern" is specified, then only the files, whose relative (to baseDir) path satisfies "pattern", are fast-reloaded, other files are full-reloaded.

"excludesPattern" is optional and should have type String or java.util.regex.Pattern.

If "excludesPattern" is not specified, then "pattern" fully defines which files are fast-reloaded.

If "excludesPattern" is specified, then those files whose relative (to baseDir) path satisfies "excludesPattern", are not fast-reloaded. "excludesPattern" is always applied after "pattern".

inplaceMode can be "soft" or "hard" (default "soft"). When "hard", the web-server serves the resources (of the given web-app) directly from src/main/webapp. When "soft", the web-server serves the resources (of the given web-app) from build/inplaceWebapp.