<commit_before>// Copyright 2017 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

[[web_project_tutorial]]
== Web Application Quickstart


[NOTE]
====

This chapter is a work in progress.

====

This chapter introduces the Gradle support for web applications. Gradle recommends two plugins for web application development: the War plugin and the https://plugins.gradle.org/plugin/org.akhikhl.gretty[Gretty plugin]. The War plugin extends the Java plugin to build a WAR file for your project. The Gretty plugin extends the War plugin to allow you to deploy your web application to an embedded Jetty web container.


[[sec:building_a_war_file]]
=== Building a WAR file

To build a WAR file, you apply the War plugin to your project:

++++
<sample id="webQuickstart" dir="webApplication/quickstart" includeLocation="true" title="War plugin">
            <sourcefile file="build.gradle" snippet="use-war-plugin"/>
        </sample>
++++

This also applies the Java plugin to your project. Running `gradle build` will compile, test and WAR your project. Gradle will look for the source files to include in the WAR file in `src/main/webapp`. Your compiled classes and their runtime dependencies are also included in the WAR file, in the `WEB-INF/classes` and `WEB-INF/lib` directories, respectively.

[TIP]
.Groovy web applications
====
You can combine multiple plugins in a single project, so you can use the War and Groovy plugins together to build a Groovy based web application. The appropriate Groovy libraries will be added to the WAR file for you.
====


[[sec:running_your_web_application]]
=== Running your web application<commit_msg>Reword Gretty description<commit_after>// Copyright 2017 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

[[web_project_tutorial]]
== Web Application Quickstart


[NOTE]
====

This chapter is a work in progress.

====

This chapter introduces the Gradle support for web applications. Gradle recommends two plugins for web application development: the War plugin and the https://plugins.gradle.org/plugin/org.akhikhl.gretty[Gretty plugin]. The War plugin extends the Java plugin to build a WAR file for your project. The Gretty plugin allows you to deploy your web application to an embedded Jetty web container.


[[sec:building_a_war_file]]
=== Building a WAR file

To build a WAR file, you apply the War plugin to your project:

++++
<sample id="webQuickstart" dir="webApplication/quickstart" includeLocation="true" title="War plugin">
            <sourcefile file="build.gradle" snippet="use-war-plugin"/>
        </sample>
++++

This also applies the Java plugin to your project. Running `gradle build` will compile, test and WAR your project. Gradle will look for the source files to include in the WAR file in `src/main/webapp`. Your compiled classes and their runtime dependencies are also included in the WAR file, in the `WEB-INF/classes` and `WEB-INF/lib` directories, respectively.

[TIP]
.Groovy web applications
====
You can combine multiple plugins in a single project, so you can use the War and Groovy plugins together to build a Groovy based web application. The appropriate Groovy libraries will be added to the WAR file for you.
====


[[sec:running_your_web_application]]
=== Running your web application
{'fraction_non_alphanumeric': 0.08189556015642972, 'fraction_numerical': 0.003680699332873246, 'mean_word_length': 4.2009569377990434, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6955710', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1090, 'n_words': 574}