Farm server-specific properties

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.

Server-specific properties

Property

Type

Default

Purpose

jvmArgs

List<String>

[]

Additional JVM arguments to servlet-container process.

servletContainer

String

'jetty9'

Servlet container to be used in farmXXX tasks. Possible values are 'jetty7', 'jetty8', 'jetty9', 'tomcat7', 'tomcat8'.

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).

httpEnabled

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.

httpPort

int

8080

TCP-port used by servlet-container for incoming HTTP-requests.

port

int

8080

This property is exactly the same as httpPort

httpIdleTimeout

int

null

When not null, defines the time, in milliseconds, that the HTTP connection can be idle before it is closed.

httpsEnabled

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.
See also: HTTPS support.

httpsPort

int

8443

TCP-port used by servlet-container for incoming HTTPS-requests.Attention: setting httpsPort alone is not enough to enable HTTPS protocol. You must set httpsEnabled=true in order to enable HTTPS.

sslKeyStorePath

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).
See also: HTTPS manual configuration