Issue #11424 - Document default of `jetty.deploy.scanInterval` at `0` (#11437)

+ Update documentation and defaults in mod files
This commit is contained in:
Joakim Erdfelt 2024-02-22 12:25:01 -08:00 committed by GitHub
parent 33e00dc452
commit bfac61cd89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 13 additions and 13 deletions

View File

@ -16,23 +16,23 @@
The `DeploymentManager` scans the `$JETTY_BASE/webapps` directory for changes every `N` seconds, where `N` is configured via the `jetty.deploy.scanInterval` property.
By default, the scan interval is `1` second, which means that _hot_ deployment is enabled: if a file is added/changed/removed from the `$JETTY_BASE/webapps` directory, the `DeploymentManager` will notice the change and respectively deploy/redeploy/undeploy the web application.
Setting the scan interval to `0` means that _static_ deployment is enabled, and the `DeploymentManager` will not scan the `$JETTY_BASE/webapps` directory for changes.
By default, the scan interval is `0` seconds, which means _static_ deployment, and the `DeploymentManager` will not scan the `$JETTY_BASE/webapps` directory for changes.
This means that to deploy/redeploy/undeploy a web application you will need to stop and restart Jetty.
The following command line disables _hot_ deployment by specifying the `jetty.deploy.scanInterval` property on the command line, and therefore only for this particular run:
Setting the scan interval to a value of `1` second (or greater) means that _hot_ deployment is enabled: if a file is added/changed/removed from the `$JETTY_BASE/webapps` directory, the `DeploymentManager` will notice the change and respectively deploy/redeploy/undeploy the web application.
The following command line enables _hot_ deployment by specifying the `jetty.deploy.scanInterval` property on the command line, and therefore only for this particular run:
----
$ java -jar $JETTY_HOME/start.jar jetty.deploy.scanInterval=0
$ java -jar $JETTY_HOME/start.jar jetty.deploy.scanInterval=1
----
To make _static_ deployment persistent, you need to edit the `deploy` module configuration file, `$JETTY_BASE/start.d/deploy.ini`, uncomment the module property `jetty.deploy.scanInterval` and change its value to `0`:
To make _hot_ deployment persistent, you need to edit the appropriate `<env>-deploy` module configuration file, `$JETTY_BASE/start.d/<env>-deploy.ini` (eg: `ee10-deploy.ini`), uncomment the module property `jetty.deploy.scanInterval` and change the value to `1` second (or greater):
.deploy.ini
.<env>-deploy.ini
[source,subs="verbatim,quotes"]
----
--module=deploy
#jetty.deploy.scanInterval=0#
#jetty.deploy.scanInterval=1#
...
----

View File

@ -29,7 +29,7 @@ contextHandlerClass?=org.eclipse.jetty.server.handler.ResourceHandler$ResourceCo
# jetty.deploy.deferInitialScan=false
## Monitored directory scan period (seconds)
# jetty.deploy.scanInterval=1
# jetty.deploy.scanInterval=0
## Default ContextHandler class for core deployments
# contextHandlerClass=org.eclipse.jetty.server.handler.ResourceHandler$ResourceContext

View File

@ -115,7 +115,7 @@ etc/jetty.xml
# end::documentation-scheduler-config[]
## Whether the handlers of the ContextHandlerCollection can be updated once the server is started
## If set to false, then eeN-deploy module jetty.deploy.scanInterval should also be set to 0.
## If set to false, then <env>-deploy module jetty.deploy.scanInterval should also be set to 0.
# jetty.server.contexts.dynamic=true
## Should the DefaultHandler serve the jetty favicon.ico from the root.

View File

@ -22,7 +22,7 @@ etc/jetty-ee10-deploy.xml
# jetty.deploy.defaultsDescriptorPath=${jetty.base}/etc/webdefault-ee10.xml
## Monitored directory scan period (seconds)
# jetty.deploy.scanInterval=1
# jetty.deploy.scanInterval=0
## Whether to extract *.war files
# jetty.deploy.extractWars=true

View File

@ -22,7 +22,7 @@ etc/jetty-ee8-deploy.xml
# jetty.deploy.defaultsDescriptorPath=${jetty.base}/etc/webdefault-ee8.xml
## Monitored directory scan period (seconds)
# jetty.deploy.scanInterval=1
# jetty.deploy.scanInterval=0
## Whether to extract *.war files
# jetty.deploy.extractWars=true

View File

@ -22,7 +22,7 @@ etc/jetty-ee9-deploy.xml
# jetty.deploy.defaultsDescriptorPath=${jetty.base}/etc/webdefault-ee9.xml
## Monitored directory scan period (seconds)
# jetty.deploy.scanInterval=1
# jetty.deploy.scanInterval=0
## Whether to extract *.war files
# jetty.deploy.extractWars=true