Provided that you already learned about multiple web apps in Gretty, now you can systematically learn all about farm tasks.

When you insert apply plugin: 'org.gretty' to "build.gradle", Gretty additionally facilitates the project with the following gradle tasks:

Tasks Purpose Stopped by Uses WAR Debug

farmRun, run

Starts web-apps of default farm

keypress

no

no

farmRunDebug, debug

Starts web-apps of default farm

keypress

no

yes

farmRunWar

Starts web-apps of default farm

keypress

yes

no

farmRunWarDebug

Starts web-apps of default farm

keypress

yes

yes

farmStart

Starts web-apps of default farm

farmStop

no

no

farmStartDebug

Starts web-apps of default farm

farmStop

no

yes

farmStartWar

Starts web-apps of default farm

farmStop

yes

no

farmStartWarDebug

Starts web-apps of default farm

farmStop

yes

yes

farmStop

Stops web-apps of default farm

-

-

-

farmRestart

Restarts web-apps of default farm

-

-

-

farmIntegrationTest

Invokes integrationTest task on web-app projects of default farm

-

-

-

farmBeforeIntegrationTest

Starts web-apps of default farm before integration tests

farmAfterIntegrationTest

no

no

farmAfterIntegrationTest

Stops web-apps of default farm after integration tests

-

-

-

When you define an additional named farm:

farms {
  farm 'XYZ', {
    webapp ':ProjectA'
    // ...
  }
}

then Gretty facilitates the project with the following gradle tasks:

Tasks Purpose Stopped by Uses WAR Debug

farmRunXYZ

Starts web-apps of farm "XYZ"

keypress

no

no

farmRunDebugXYZ

Starts web-apps of farm "XYZ"

keypress

no

yes

farmRunWarXYZ

Starts web-apps of farm "XYZ"

keypress

yes

no

farmRunWarDebugXYZ

Starts web-apps of farm "XYZ"

keypress

yes

yes

farmStartXYZ

Starts web-apps of farm "XYZ"

farmStop

no

no

farmStartDebugXYZ

Starts web-apps of farm "XYZ"

farmStop

no

yes

farmStartWarXYZ

Starts web-apps of farm "XYZ"

farmStop

yes

no

farmStartWarDebugXYZ

Starts web-apps of farm "XYZ"

farmStop

yes

yes

farmStopXYZ

Stops web-apps of farm "XYZ"

-

-

-

farmRestartXYZ

Restarts web-apps of farm "XYZ"

-

-

-

farmIntegrationTestXYZ

Invokes integrationTest task on web-app projects of farm "XYZ"

-

-

-

farmBeforeIntegrationTestXYZ

Starts web-apps of farm "XYZ" before integration tests

farmAfterIntegrationTest

no

no

farmAfterIntegrationTestXYZ

Stops web-apps of farm "XYZ" after integration tests

-

-

-