This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/tomcat-maven-plugin.git
The following commit(s) were added to refs/heads/trunk by this push:
new b180fe7 Docs updates
b180fe7 is described below
commit b180fe7f5656ed7429bef2e13760379350aea598
Author: remm <[email protected]>
AuthorDate: Wed Apr 15 20:55:18 2026 +0200
Docs updates
---
README.md | 129 ++++++++++++++++++++++++++++++++-------
src/site/apt/container-goals.apt | 2 +-
src/site/apt/context-goals.apt | 7 ++-
src/site/apt/index.apt.vm | 1 +
src/site/apt/run-goals.apt | 92 ++++++++++++++++++++++++++++
5 files changed, 206 insertions(+), 25 deletions(-)
diff --git a/README.md b/README.md
index 15682d3..19e65d5 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,27 @@ The plugin supports Tomcat 9, Tomcat 10, and Tomcat 11.
- Java 8 or higher
- Maven 3.8.1 or higher
+## Build
+
+Edit the main pom.xml to set the main <version> which should correspond
+to the version of Apache Tomcat that is going to be used.
+
+```bash
+mvn clean install
+```
+
+To run integration tests:
+
+```bash
+mvn clean install -Prun-its
+```
+
+Override default ports for integration tests:
+
+```bash
+mvn clean install -Prun-its -Dits.http.port=8080 -Dits.ajp.port=8009
+```
+
## Basic Usage
Add the plugin to your `pom.xml`:
@@ -36,12 +57,58 @@ Add the plugin to your `pom.xml`:
mvn tomcat:run
```
+**run-war** - Run the current project as a packaged web application:
+
+```bash
+mvn tomcat:run-war
+```
+
+**exec-war** - Create a self-executable JAR file with embedded Tomcat:
+
+```bash
+mvn tomcat:exec-war
+```
+
+**standalone-war** - Create an executable WAR file with embedded Tomcat:
+
+```bash
+mvn tomcat:standalone-war
+```
+
+**shutdown** - Shut down all embedded Tomcat servers:
+
+```bash
+mvn tomcat:shutdown
+```
+
+### Run Goals (No Lifecycle Forking)
+
+The following goals are similar to the above but don't fork the Maven
lifecycle:
+
+**run-war-only** - Run the current project as a packaged web application
without forking the package phase:
+
+```bash
+mvn tomcat:run-war-only
+```
+
+**exec-war-only** - Create a self-executable JAR file without forking the
package phase:
+
+```bash
+mvn tomcat:exec-war-only
+```
+
+**standalone-war-only** - Create an executable WAR file without forking the
package phase:
+
+```bash
+mvn tomcat:standalone-war-only
+```
+
### Deploy Goals
**deploy** - Deploy a WAR to Tomcat:
```bash
-mvn package tomcat:deploy
+mvn tomcat:deploy
```
**undeploy** - Undeploy a WAR from Tomcat:
@@ -53,7 +120,19 @@ mvn tomcat:undeploy
**redeploy** - Redeploy an existing WAR:
```bash
-mvn package tomcat:redeploy
+mvn tomcat:redeploy
+```
+
+**deploy-only** - Deploy a WAR to Tomcat without forking the package lifecycle:
+
+```bash
+mvn tomcat:deploy-only
+```
+
+**redeploy-only** - Redeploy a WAR without forking the package lifecycle:
+
+```bash
+mvn tomcat:redeploy-only
```
### Container Goals
@@ -64,10 +143,10 @@ mvn package tomcat:redeploy
mvn tomcat:list
```
-**info** - Get server information:
+**serverinfo** - Get server information:
```bash
-mvn tomcat:info
+mvn tomcat:serverinfo
```
**resources** - List JNDI resources:
@@ -76,6 +155,30 @@ mvn tomcat:info
mvn tomcat:resources
```
+**reload** - Reload a web application:
+
+```bash
+mvn tomcat:reload
+```
+
+**sessions** - List session information for a web application:
+
+```bash
+mvn tomcat:sessions
+```
+
+**start** - Start a web application:
+
+```bash
+mvn tomcat:start
+```
+
+**stop** - Stop a web application:
+
+```bash
+mvn tomcat:stop
+```
+
## Configuration
### Deploy to Tomcat
@@ -125,24 +228,6 @@ Configure custom HTTP port in your `pom.xml`:
</plugin>
```
-## Build
-
-```bash
-mvn clean install
-```
-
-To run integration tests:
-
-```bash
-mvn clean install -Prun-its
-```
-
-Override default ports for integration tests:
-
-```bash
-mvn clean install -Prun-its -Dits.http.port=8080 -Dits.ajp.port=8009
-```
-
## Snapshots Deployment
To deploy a snapshot version to
https://repository.apache.org/content/repositories/snapshots/, you must run:
diff --git a/src/site/apt/container-goals.apt b/src/site/apt/container-goals.apt
index 1a9d7ef..65c36bc 100644
--- a/src/site/apt/container-goals.apt
+++ b/src/site/apt/container-goals.apt
@@ -52,7 +52,7 @@ mvn tomcat:list
type:
+--
-mvn tomcat:info
+mvn tomcat:serverinfo
+--
* {Listing JNDI resources}
diff --git a/src/site/apt/context-goals.apt b/src/site/apt/context-goals.apt
index f33b076..d65ef07 100644
--- a/src/site/apt/context-goals.apt
+++ b/src/site/apt/context-goals.apt
@@ -29,8 +29,11 @@
Context Goals
- This document describes the context goals available in the Apache Tomcat
Maven Plugin.
- These goals allow you to manage web applications deployed to a running
Tomcat server.
+ This document describes the context goals available in the Apache Tomcat
Maven Plugin.
+ These goals allow you to manage web applications deployed to a running
Tomcat server.
+
+ For running web applications with an embedded Tomcat server, see the
+ {{{./run-goals.html}Run Goals}} documentation.
* {Deploying a WAR project}
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 171e545..bca4806 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -70,6 +70,7 @@ Apache Tomcat Maven Plugin
* Goals Overview
* {{{./context-goals.html}Deployment goals (run, deploy, undeploy, etc)}}
+ * {{{./run-goals.html}Run goals (run, run-war, exec-war, standalone-war,
shutdown)}}
* {{{./executable-war-jar.html}Executable WAR goals (standalone-war,
exec-war)}}
* {{{./run-mojo-features.html}Run features documentation}}
diff --git a/src/site/apt/run-goals.apt b/src/site/apt/run-goals.apt
new file mode 100644
index 0000000..605a524
--- /dev/null
+++ b/src/site/apt/run-goals.apt
@@ -0,0 +1,92 @@
+---
+ Run Goals
+ ---
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements. See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership. The ASF licenses this file
+ ~~ to you 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.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Run Goals
+
+ This document describes run-related goals in the Apache Tomcat Maven Plugin.
+
+ * {{{#Running a web application}Running a web application}}
+ * {{{#Running a packaged web application}Running a packaged web application}}
+ * {{{#Creating an executable JAR}Creating an executable JAR}}
+ * {{{#Creating a standalone WAR}Creating a standalone WAR}}
+ * {{{#Shutting down Tomcat}Shutting down Tomcat}}
+ []
+
+ These are described in more detail below.
+
+* {Running a web application}
+
+ To run the current project as a dynamic web application using an embedded
Tomcat server you can type:
+
++--
+mvn tomcat:run
++--
+
+ This will start an embedded Tomcat instance and deploy your web application
to it.
+ The source code is compiled and deployed dynamically without needing to
create a WAR file first.
+
+* {Running a packaged web application}
+
+ To run the current project as a packaged web application using an embedded
Tomcat server you can type:
+
++--
+mvn tomcat:run-war
++--
+
+ This is similar to the run goal but uses an already packaged WAR file
instead of dynamic compilation.
+
+* {Creating an executable JAR}
+
+ To create a self-executable JAR file containing all necessary Apache Tomcat
classes you can type:
+
++--
+mvn tomcat:exec-war
++--
+
+ This allows you to run your web application using just `java -jar
mywebapp.jar` without needing to install a Tomcat instance.
+
+* {Creating a standalone WAR}
+
+ To create an executable WAR file with embedded Tomcat that is also capable
of being deployed elsewhere you can type:
+
++--
+mvn tomcat:standalone-war
++--
+
+ This creates a WAR file that can be both executed directly and deployed to
any Tomcat server.
+
+* {Shutting down Tomcat}
+
+ To shut down all embedded Tomcat servers that were started by the plugin you
can type:
+
++--
+mvn tomcat:shutdown
++--
+
+ This will gracefully shut down all embedded Tomcat instances that were
started during the current Maven session.
+
+ Note: The shutdown goal is typically bound to the post-integration-test
phase for integration testing scenarios.
+
+ Note: For detailed information about running web applications, please refer
to the
+ Tomcat documentation at http://tomcat.apache.org/tomcat-11.0-doc/index.html
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]