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 eb51ed9  Add unimplemented but documented mojos
eb51ed9 is described below

commit eb51ed937a3e8140d35fd2357152f54f0dafdccc
Author: remm <[email protected]>
AuthorDate: Fri Apr 10 14:58:29 2026 +0200

    Add unimplemented but documented mojos
---
 .../maven/plugin/tomcat/deploy/ListMojo.java       | 55 ++++++++++++++++
 .../maven/plugin/tomcat/deploy/ReloadMojo.java     | 58 +++++++++++++++++
 .../maven/plugin/tomcat/deploy/ResourcesMojo.java  | 73 ++++++++++++++++++++++
 .../maven/plugin/tomcat/deploy/RolesMojo.java      | 55 ++++++++++++++++
 .../maven/plugin/tomcat/deploy/ServerInfoMojo.java | 55 ++++++++++++++++
 .../maven/plugin/tomcat/deploy/SessionsMojo.java   | 55 ++++++++++++++++
 .../maven/plugin/tomcat/deploy/StartMojo.java      | 58 +++++++++++++++++
 .../maven/plugin/tomcat/deploy/StopMojo.java       | 58 +++++++++++++++++
 src/site/apt/context-goals.apt                     |  8 +++
 9 files changed, 475 insertions(+)

diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ListMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ListMojo.java
new file mode 100644
index 0000000..80078f1
--- /dev/null
+++ b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ListMojo.java
@@ -0,0 +1,55 @@
+package org.apache.tomcat.maven.plugin.tomcat.deploy;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.plugin.tomcat.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * List all web applications currently running in Tomcat.
+ *
+ * @since 3.0
+ */
+@Mojo( name = "list", threadSafe = true )
+public class ListMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        getLog().info( messagesProvider.getMessage( "ListMojo.listApps", 
getURL() ) );
+
+        String responseBody = getManager().list().getHttpResponseBody();
+
+        log( responseBody );
+    }
+}
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ReloadMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ReloadMojo.java
new file mode 100644
index 0000000..f1fa1ae
--- /dev/null
+++ b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ReloadMojo.java
@@ -0,0 +1,58 @@
+package org.apache.tomcat.maven.plugin.tomcat.deploy;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+import org.apache.tomcat.maven.plugin.tomcat.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * Reload a web application in Tomcat.
+ *
+ * @since 3.0
+ */
+@Mojo( name = "reload", threadSafe = true )
+public class ReloadMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        getLog().info( messagesProvider.getMessage( "ReloadMojo.reloadingApp", 
getDeployedURL() ) );
+
+        TomcatManagerResponse tomcatResponse = getManager().reload( getPath() 
);
+
+        checkTomcatResponse( tomcatResponse );
+
+        log( tomcatResponse.getHttpResponseBody() );
+    }
+}
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ResourcesMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ResourcesMojo.java
new file mode 100644
index 0000000..489be78
--- /dev/null
+++ 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ResourcesMojo.java
@@ -0,0 +1,73 @@
+package org.apache.tomcat.maven.plugin.tomcat.deploy;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.plugin.tomcat.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * List the JNDI resources configured in Tomcat.
+ *
+ * @since 3.0
+ */
+@Mojo( name = "resources", threadSafe = true )
+public class ResourcesMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * The type of resources to list, or <code>null</code> for all.
+     */
+    @Parameter( property = "maven.tomcat.type" )
+    private String type;
+
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        if ( type == null )
+        {
+            getLog().info( messagesProvider.getMessage( 
"ResourcesMojo.listAllResources", getURL() ) );
+        }
+        else
+        {
+            getLog().info( messagesProvider.getMessage( 
"ResourcesMojo.listTypedResources", type, getURL() ) );
+        }
+
+        String responseBody = getManager().getResources( type 
).getHttpResponseBody();
+
+        log( responseBody );
+    }
+}
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/RolesMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/RolesMojo.java
new file mode 100644
index 0000000..248f700
--- /dev/null
+++ b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/RolesMojo.java
@@ -0,0 +1,55 @@
+package org.apache.tomcat.maven.plugin.tomcat.deploy;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.plugin.tomcat.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * List the security roles available in Tomcat.
+ *
+ * @since 3.0
+ */
+@Mojo( name = "roles", threadSafe = true )
+public class RolesMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        getLog().info( messagesProvider.getMessage( "RolesMojo.listRoles", 
getURL() ) );
+
+        String responseBody = getManager().getRoles().getHttpResponseBody();
+
+        log( responseBody );
+    }
+}
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ServerInfoMojo.java
 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ServerInfoMojo.java
new file mode 100644
index 0000000..227259f
--- /dev/null
+++ 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/ServerInfoMojo.java
@@ -0,0 +1,55 @@
+package org.apache.tomcat.maven.plugin.tomcat.deploy;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.plugin.tomcat.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * List information about the Tomcat server.
+ *
+ * @since 3.0
+ */
+@Mojo( name = "serverinfo", threadSafe = true )
+public class ServerInfoMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        getLog().info( messagesProvider.getMessage( "ServerInfoMojo.listInfo", 
getURL() ) );
+
+        String responseBody = 
getManager().getServerInfo().getHttpResponseBody();
+
+        log( responseBody );
+    }
+}
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/SessionsMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/SessionsMojo.java
new file mode 100644
index 0000000..772a948
--- /dev/null
+++ 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/SessionsMojo.java
@@ -0,0 +1,55 @@
+package org.apache.tomcat.maven.plugin.tomcat.deploy;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.plugin.tomcat.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * List session information for a web application.
+ *
+ * @since 3.0
+ */
+@Mojo( name = "sessions", threadSafe = true )
+public class SessionsMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        getLog().info( messagesProvider.getMessage( 
"SessionsMojo.listSessions", getURL() ) );
+
+        String responseBody = getManager().getSessions( getPath() 
).getHttpResponseBody();
+
+        log( responseBody );
+    }
+}
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/StartMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/StartMojo.java
new file mode 100644
index 0000000..862f010
--- /dev/null
+++ b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/StartMojo.java
@@ -0,0 +1,58 @@
+package org.apache.tomcat.maven.plugin.tomcat.deploy;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+import org.apache.tomcat.maven.plugin.tomcat.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * Start a web application in Tomcat.
+ *
+ * @since 3.0
+ */
+@Mojo( name = "start", threadSafe = true )
+public class StartMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        getLog().info( messagesProvider.getMessage( "StartMojo.startingApp", 
getDeployedURL() ) );
+
+        TomcatManagerResponse tomcatResponse = getManager().start( getPath() );
+
+        checkTomcatResponse( tomcatResponse );
+
+        log( tomcatResponse.getHttpResponseBody() );
+    }
+}
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/StopMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/StopMojo.java
new file mode 100644
index 0000000..4e26585
--- /dev/null
+++ b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/deploy/StopMojo.java
@@ -0,0 +1,58 @@
+package org.apache.tomcat.maven.plugin.tomcat.deploy;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+import org.apache.tomcat.maven.plugin.tomcat.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * Stop a web application in Tomcat.
+ *
+ * @since 3.0
+ */
+@Mojo( name = "stop", threadSafe = true )
+public class StopMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        getLog().info( messagesProvider.getMessage( "StopMojo.stoppingApp", 
getDeployedURL() ) );
+
+        TomcatManagerResponse tomcatResponse = getManager().stop( getPath() );
+
+        checkTomcatResponse( tomcatResponse );
+
+        log( tomcatResponse.getHttpResponseBody() );
+    }
+}
\ No newline at end of file
diff --git a/src/site/apt/context-goals.apt b/src/site/apt/context-goals.apt
index cfb7699..f33b076 100644
--- a/src/site/apt/context-goals.apt
+++ b/src/site/apt/context-goals.apt
@@ -77,6 +77,14 @@ mvn tomcat:start
 mvn tomcat:stop
 +--
 
+* {Reloading a WAR project}
+
+  To reload a WAR in Tomcat you can type:
+
++--
+mvn tomcat:reload
++--
+
 * {Listing session statistics}
 
   To list the session statistics for a deployed WAR project you can type:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to