Jetty plugin

The Jetty plug-in inherits from the War plug-in and adds some tasks that allow you to deploy your web application to a Jetty web embedded container during construction.

Usage

To use Jetty’s plug-in, please include the following statement in the build script:

Use Jetty plug-in

strong>

build.gradle

apply plugin:'jetty'

Task

Jetty plugin defines the following Tasks:

Table 28.1. Jetty plug-in-tasks

task name depends on Type Description
jettyRun compile jettyRun Start the Jetty instance and deploy the exploded web application.
jettyRunWar war jettyRunWar Start the Jetty instance and deploy the WAR package.
jettyStop jettyStop Stop the Jetty instance.

Figure 28.1. Jetty plug-in-tasks

Project layout

The Jetty plugin uses the same layout as the War plugin.

Dependency Management

The Jetty plugin does not define any dependency configuration.

Convention attributes

Jetty plugin defines the following convention attributes:

Table 28.2. Jetty plugin-attributes

< /thead>

< td> The base name of the WAR file

Attribute name Type Default value Description
contextPath String The deployment location of the application in the Jetty container.
httpPort Integer 8080 The TCP port where Jetty listens for HTTP requests.
stopPort Integer null Jetty listens to the TCP port requested by the admin.
stopKey String null The key passed to Jetty when it needs to stop.

These attributes are provided by a JettyPluginConvention convention object.

Leave a Comment

Your email address will not be published.