gretty {
port = 8181
}
farm {
port = 9191
webapp project
}
Farm configuration defines it’s own set of server-specific properties. When you run a farm task, it uses server-specific properties defined in farm configuration and ignores server-specific properties defined in gretty configurations. For example:
gretty {
port = 8181
}
farm {
port = 9191
webapp project
}
when you invoke gradle farmRun
, it serves port 9191.
when you invoke gradle appRun
, it serves port 8181.
Property | Type | Default | Purpose |
---|---|---|---|
List<String> |
[] |
Additional JVM arguments to servlet-container process. |
|
String |
'jetty9' |
Servlet container to be used in farmXXX tasks. Possible values are 'jetty7', 'jetty8', 'jetty9', 'tomcat7', 'tomcat8'. |
|
boolean |
false |
When true, Gretty gradle tasks facilitate your web-app with springloaded library, thus allowing to live-reload compiled classes and avoid restarting servlet container. |
|
String |
"localhost" |
host is passed to servlet-container connectors. If you use HTTPS, host must match CN of the subject DN of the certificate (if you use HTTP auto-configuration, this is ensured automatically). |
|
boolean |
true |
When httpEnabled is true, Gretty configures HTTP connector for the designated httpPort. Otherwise HTTP protocol is disabled. Normally either httpEnabled or httpsEnabled should be true. |
|
int |
8080 |
TCP-port used by servlet-container for incoming HTTP-requests. |
|
int |
8080 |
This property is exactly the same as httpPort |
|
int |
null |
When not null, defines the time, in milliseconds, that the HTTP connection can be idle before it is closed. |
|
boolean |
false |
When httpsEnabled is true, Gretty configures HTTPS connector for the designated httpsPort. Otherwise HTTPS protocol is disabled. Normally either httpEnabled or httpsEnabled should be true. |
|
int |
8443 |
TCP-port used by servlet-container for incoming HTTPS-requests. |
|
String or java.io.File |
null |
Absolute or relative path to the key-store, containing key and certificate for HTTPS connection. If sslKeyStorePath is not specified, all other SSL-related properties are ignored and HTTPS is auto-configured (if it is enabled). |
|
String |
null |
Password for the key-store designated by property sslKeyStorePath. |
|
String |
sslKeyStorePassword |
Password for the key of this host, stored in key-store designated by property sslKeyStorePath. |
|
String or java.io.File |
sslKeyStorePath |
Absolute or relative path to the trust-store for HTTPS connection. |
|
String |
null |
Password for the key-store designated by property sslKeyStorePath. |
|
int |
null |
When not null, defines the time, in milliseconds, that the HTTPS connection can be idle before it is closed. |
|
String or java.io.File |
"jetty.xml" or "tomcat.xml" |
Name and/or location of servlet-container-specific server configuration file. |
|
String or java.io.File |
"jetty.xml" |
Name and/or location of "jetty.xml" file. |
|
String |
null |
Security realm for the given farm. |
|
String or java.io.File |
"jetty-realm.properties" or "tomcat-users.xml" |
Contains security realm properties for the given farm. |
|
boolean |
false |
true, if single sign-on should be enabled for the given farm. |
|
int |
1 |
Hot-deployment scan interval, in seconds. |
|
String |
"logback.groovy" or "logback.xml" |
Absolute or relative path to logback configuration file (.groovy or .xml). |
|
String |
"INFO" |
slf4j logging-level for servlet-container process. |
|
boolean |
true |
Defines whether log messages are written to the terminal. |
|
boolean |
true |
Defines, whether log messages are written to the log-file. |
|
String |
"${project.name}.log" |
Log file name (without path). |
|
String |
"${user.home}/logs" |
Directory, where the log file is created. |
|
function(Closure) |
- |
Adds closure to be called just before servlet-container is started. |
|
function(Closure) |
- |
Adds closure to be called just after servlet-container is stopped. |
|
function(Closure) |
- |
Adds closure to be called on hot-deployment scan. |
|
function(Closure) |
- |
Adds closure to be called whenever hot-deployment detects that files or folders were changed. |
|
int |
9900 |
TCP-port used by Gretty to send commands to servlet-container process. |
|
int |
9901 |
TCP-port used by servlet-container process to send status back to Gretty. |
See also: