JVM options for gwb build commands

The following JVM options work with many of the PolicyCenter gwb build commands.

JVM option syntax

Description

-Denv=aaaa

Starts the PolicyCenter server using the specified environment variable (env).

-Dgw.passthrough.systemProperty=dddd

Starts the PolicyCenter server using the provided system property value. The option parameters have the following meanings:

  • systemProperty – The name of a system property defined in the <registry> element in file config.xml.
  • dddd – The value of the system property.

JVM env string value always lower case

If you use a JVM option to set the server environment, PolicyCenter converts the provided string to lower case automatically. For example, the conversion to lower case occurs if you use the following JVM options:

  • Jetty - -Denv
  • Tomcat - -Dgw.pc.env
  • Studio - -Dgw.pc.serverid
Thus, if you enter -Dgw.pc.env=TEST, PolicyCenter converts the string TEST to the string test. Be aware that the automatic conversion of the env string to lower case can cause a referenced env value to not match the defined environment name.
Note: If you start the Quickstart server from the command line, use -Doption. If you use any other application server, including the server that starts from within Guidewire Studio, use -Dgw.pc.option

Reference table of core gwb commands

It is possible to use the -Denv and the -Dgw.passthrough JVM options with some, but not all, of the gwb build commands. The following table indicates whether the listed JVM command options work with the core gwb commands (tasks).

Core task

Can use JVM option

Cannot use JVM option

clean

cleanIdea

codegen

compile

dropDb

genDataDictionary

idea

runServer

stopServer

studio

JVM option examples

For example, to pass -DmySystemProperty=someValue to build command dropDB, use the following command option.

  • gwb dropDb -Dgw.passthrough.mySystemProperty=someValue

Then, to make the dropDB command specific to a test environment, use the following command (for a Jetty server).

  • gwb dropDb -Denv=test -Dgw.passthrough.mySystemProperty=someValue

The following build command illustrates the use of a pass through system property.

  • gwb runServer -Dgw.passthrough.javax.net.ssl.keyStore=/Java/jdk1.8.0_74/jre/lib/security/cacerts