Gradle 1.12 User Guide translation-Chapter 4. Jetty plug-in, gradlejetty

Source: Internet
Author: User

Gradle 1.12 User Guide translation-Chapter 4. Jetty plug-in, gradlejetty

For translation of other chapters, see:

Http://blog.csdn.net/column/details/gradle-translation.html

Please pay attention to the address on Github for translation projects:

Https://github.com/msdx/gradledoc/tree/1.12.

To view the bilingual documents directly, visit:

Http://gradledoc.qiniudn.com/1.12/userguide/userguide.html.

In addition, Android mobile users can browse documents through a program I have written, with the cache function. Currently, Android 0.2 is compatible with Android 2.1 and later versions (not tested in versions 5.0 and later). The address is as follows:

Http://www.wandoujia.com/apps/com.githang.gradledoc

It is not easy to translate. For more information, see the source of this article on the CSDN blog:

Http://blog.csdn.net/maosidiaoxian/article/details/45555937

For my translations of Gradle, refer to the project on Github and documents on the http://gradledoc.qiniudn.com. If any translation error is found, it will be updated in the above two places first. Due to time and energy problems, the translations published in the blog are basically not modified simultaneously.



Chapter 4. Jetty plug-in

The Jetty plugin inherits from the War plugin and adds tasks that allow you to deploy your web application to a Jetty Embedded web Container during building.

28.1. Usage

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

Example 28.1. Use the Jetty plug-in

build.gradle

apply plugin: 'jetty'
28.2. Task

The Jetty plugin defines the following tasks:

Table 28.1. Jetty plug-in-task

Task Name Dependent 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 a Jetty instance.

Figure 28.1. Jetty plug-in-tasks


28.3. Project Layout

The Jetty plug-in uses the same layout as the War plug-in.

28.4. Dependency Management

The Jetty plug-in does not define any dependency configuration.

28.5. Convention attributes

The Jetty plugin defines the following conventions:

Table 28.2. Jetty plug-in-attributes

Attribute name Type Default Value Description
contextPath String Base name of the WAR File The Application Deployment location in the Jetty container.
httpPort Integer 8080 Jetty listens to the TCP port of the HTTP request.
stopPort Integer null Jetty listens to the TCP port of the admin request.
stopKey String null The key passed to Jetty when the request needs to be stopped.

These attributes are composedJettyPluginConventionObjects of the Convention are provided.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.