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 3fff07a  Type hierarchy improvements
3fff07a is described below

commit 3fff07a4c8a2a54676e9112b894f0908a079bd6e
Author: remm <[email protected]>
AuthorDate: Thu Apr 16 11:17:05 2026 +0200

    Type hierarchy improvements
---
 .../tomcat/maven/common/config/AbstractWebapp.java | 177 ---------------------
 .../maven/plugin/tomcat/deploy/ListMojo.java       |   4 +-
 .../maven/plugin/tomcat/deploy/ReloadMojo.java     |   4 +-
 .../maven/plugin/tomcat/deploy/ResourcesMojo.java  |   4 +-
 .../maven/plugin/tomcat/deploy/ServerInfoMojo.java |   4 +-
 .../maven/plugin/tomcat/deploy/SessionsMojo.java   |   4 +-
 .../maven/plugin/tomcat/deploy/StartMojo.java      |   4 +-
 .../maven/plugin/tomcat/deploy/StopMojo.java       |   4 +-
 .../maven/plugin/tomcat/run/AbstractRunMojo.java   |   5 +-
 .../maven/plugin/tomcat/run/ExtraDependency.java   |   2 +
 .../maven/plugin/tomcat/run/ExtraResource.java     |   2 +
 .../tomcat/maven/plugin/tomcat/run/Webapp.java     | 126 +++++++++++++--
 12 files changed, 135 insertions(+), 205 deletions(-)

diff --git 
a/src/main/java/org/apache/tomcat/maven/common/config/AbstractWebapp.java 
b/src/main/java/org/apache/tomcat/maven/common/config/AbstractWebapp.java
deleted file mode 100644
index 9aeaef3..0000000
--- a/src/main/java/org/apache/tomcat/maven/common/config/AbstractWebapp.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package org.apache.tomcat.maven.common.config;
-
-/*
- * 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.artifact.Artifact;
-
-import java.io.File;
-
-/**
- * @since 2.0
- */
-public abstract class AbstractWebapp
-{
-
-    /**
-     *
-     */
-    private String groupId;
-
-    /**
-     *
-     */
-    private String artifactId;
-
-    /**
-     *
-     */
-    private String version = null;
-
-    /**
-     *
-     */
-    private String type = "war";
-
-    /**
-     *
-     */
-    private String classifier;
-
-    /**
-     * @parameter
-     */
-    private String contextPath;
-
-    private Artifact artifact;
-
-    private File contextFile;
-
-    private boolean asWebapp = false;
-
-    public AbstractWebapp()
-    {
-        super();
-    }
-
-    public AbstractWebapp( Artifact artifact )
-    {
-        this.setArtifact( artifact );
-        this.setGroupId( artifact.getGroupId() );
-        this.setArtifactId( artifact.getArtifactId() );
-        this.setVersion( artifact.getVersion() );
-        this.setClassifier( artifact.getClassifier() );
-        this.setType( artifact.getType() );
-    }
-
-    public String getGroupId()
-    {
-        return groupId;
-    }
-
-    public void setGroupId( String groupId )
-    {
-        this.groupId = groupId;
-    }
-
-    public String getArtifactId()
-    {
-        return artifactId;
-    }
-
-    public void setArtifactId( String artifactId )
-    {
-        this.artifactId = artifactId;
-    }
-
-    public String getVersion()
-    {
-        return version;
-    }
-
-    public void setVersion( String version )
-    {
-        this.version = version;
-    }
-
-    public String getType()
-    {
-        return type;
-    }
-
-    public void setType( String type )
-    {
-        this.type = type;
-    }
-
-    public String getClassifier()
-    {
-        return classifier;
-    }
-
-    public void setClassifier( String classifier )
-    {
-        this.classifier = classifier;
-    }
-
-    public String getContextPath()
-    {
-        if ( contextPath == null || contextPath.isEmpty() )
-        {
-            return this.artifactId;
-        }
-        return contextPath;
-    }
-
-    public void setContextPath( String contextPath )
-    {
-        this.contextPath = contextPath;
-    }
-
-    public Artifact getArtifact()
-    {
-        return artifact;
-    }
-
-    public void setArtifact( Artifact artifact )
-    {
-        this.artifact = artifact;
-    }
-
-    public void setContextFile( File contextFile )
-    {
-        this.contextFile = contextFile;
-    }
-
-    public File getContextFile()
-    {
-        return contextFile;
-    }
-
-    public boolean isAsWebapp()
-    {
-        return asWebapp;
-    }
-
-    public void setAsWebapp( boolean asWebapp )
-    {
-        this.asWebapp = asWebapp;
-    }
-}
\ No newline at end of file
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
index 80078f1..5937dd9 100644
--- 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
@@ -22,7 +22,7 @@ package org.apache.tomcat.maven.plugin.tomcat.deploy;
 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 org.apache.tomcat.maven.plugin.tomcat.AbstractCatalinaMojo;
 
 import java.io.IOException;
 
@@ -33,7 +33,7 @@ import java.io.IOException;
  */
 @Mojo( name = "list", threadSafe = true )
 public class ListMojo
-    extends AbstractWarCatalinaMojo
+    extends AbstractCatalinaMojo
 {
     // ----------------------------------------------------------------------
     // Protected Methods
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
index f1fa1ae..cf35c06 100644
--- 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
@@ -23,7 +23,7 @@ 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 org.apache.tomcat.maven.plugin.tomcat.AbstractCatalinaMojo;
 
 import java.io.IOException;
 
@@ -34,7 +34,7 @@ import java.io.IOException;
  */
 @Mojo( name = "reload", threadSafe = true )
 public class ReloadMojo
-    extends AbstractWarCatalinaMojo
+    extends AbstractCatalinaMojo
 {
     // ----------------------------------------------------------------------
     // Protected Methods
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
index 489be78..d570702 100644
--- 
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
@@ -23,7 +23,7 @@ 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 org.apache.tomcat.maven.plugin.tomcat.AbstractCatalinaMojo;
 
 import java.io.IOException;
 
@@ -34,7 +34,7 @@ import java.io.IOException;
  */
 @Mojo( name = "resources", threadSafe = true )
 public class ResourcesMojo
-    extends AbstractWarCatalinaMojo
+    extends AbstractCatalinaMojo
 {
     // ----------------------------------------------------------------------
     // Mojo Parameters
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
index 227259f..bd7e97c 100644
--- 
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
@@ -22,7 +22,7 @@ package org.apache.tomcat.maven.plugin.tomcat.deploy;
 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 org.apache.tomcat.maven.plugin.tomcat.AbstractCatalinaMojo;
 
 import java.io.IOException;
 
@@ -33,7 +33,7 @@ import java.io.IOException;
  */
 @Mojo( name = "serverinfo", threadSafe = true )
 public class ServerInfoMojo
-    extends AbstractWarCatalinaMojo
+    extends AbstractCatalinaMojo
 {
     // ----------------------------------------------------------------------
     // Protected Methods
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
index 772a948..72e6084 100644
--- 
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
@@ -22,7 +22,7 @@ package org.apache.tomcat.maven.plugin.tomcat.deploy;
 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 org.apache.tomcat.maven.plugin.tomcat.AbstractCatalinaMojo;
 
 import java.io.IOException;
 
@@ -33,7 +33,7 @@ import java.io.IOException;
  */
 @Mojo( name = "sessions", threadSafe = true )
 public class SessionsMojo
-    extends AbstractWarCatalinaMojo
+    extends AbstractCatalinaMojo
 {
     // ----------------------------------------------------------------------
     // Protected Methods
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
index 862f010..0adffa6 100644
--- 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
@@ -23,7 +23,7 @@ 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 org.apache.tomcat.maven.plugin.tomcat.AbstractCatalinaMojo;
 
 import java.io.IOException;
 
@@ -34,7 +34,7 @@ import java.io.IOException;
  */
 @Mojo( name = "start", threadSafe = true )
 public class StartMojo
-    extends AbstractWarCatalinaMojo
+    extends AbstractCatalinaMojo
 {
     // ----------------------------------------------------------------------
     // Protected Methods
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
index 4e26585..2d96647 100644
--- 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
@@ -23,7 +23,7 @@ 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 org.apache.tomcat.maven.plugin.tomcat.AbstractCatalinaMojo;
 
 import java.io.IOException;
 
@@ -34,7 +34,7 @@ import java.io.IOException;
  */
 @Mojo( name = "stop", threadSafe = true )
 public class StopMojo
-    extends AbstractWarCatalinaMojo
+    extends AbstractCatalinaMojo
 {
     // ----------------------------------------------------------------------
     // Protected Methods
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractRunMojo.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractRunMojo.java
index 4b6fbb4..06a9109 100644
--- 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractRunMojo.java
+++ 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractRunMojo.java
@@ -76,7 +76,6 @@ import org.apache.maven.shared.filtering.MavenFileFilter;
 import org.apache.maven.shared.filtering.MavenFileFilterRequest;
 import org.apache.maven.shared.filtering.MavenFilteringException;
 import org.apache.tomcat.JarScanner;
-import org.apache.tomcat.maven.common.config.AbstractWebapp;
 import org.apache.tomcat.maven.common.run.EmbeddedRegistry;
 import org.apache.tomcat.maven.plugin.tomcat.AbstractTomcatMojo;
 import org.apache.tomcat.util.net.SSLHostConfig;
@@ -1396,7 +1395,7 @@ public abstract class AbstractRunMojo
             }
         }
 
-        for ( AbstractWebapp additionalWebapp : getAdditionalWebapps() )
+        for ( Webapp additionalWebapp : getAdditionalWebapps() )
         {
             String contextPath = additionalWebapp.getContextPath();
             if ( !contextPath.startsWith( "/" ) )
@@ -1495,7 +1494,7 @@ public abstract class AbstractRunMojo
      * @return Artifact object representing the specified file.
      * @throws MojoExecutionException with a message if the version can't be 
found in DependencyManagement.
      */
-    protected Artifact getArtifact( AbstractWebapp additionalWebapp )
+    protected Artifact getArtifact( Webapp additionalWebapp )
         throws MojoExecutionException
     {
 
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/ExtraDependency.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/ExtraDependency.java
index eddc8f4..f9b78b3 100644
--- 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/ExtraDependency.java
+++ 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/ExtraDependency.java
@@ -27,5 +27,7 @@ import org.apache.maven.model.Dependency;
 public class ExtraDependency
     extends Dependency
 {
+
+    private static final long serialVersionUID = 1L;
     // no op just here to support for maven 2.x
 }
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/ExtraResource.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/ExtraResource.java
index 04977c9..a3113ad 100644
--- a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/ExtraResource.java
+++ b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/ExtraResource.java
@@ -26,6 +26,8 @@ import org.apache.maven.model.Resource;
 public class ExtraResource
     extends Resource
 {
+
+    private static final long serialVersionUID = 1L;
     // no op just here to support for maven 2.x
 }
 
diff --git 
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/Webapp.java 
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/Webapp.java
index cff39dc..a1f78ed 100644
--- a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/Webapp.java
+++ b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/Webapp.java
@@ -1,5 +1,7 @@
 package org.apache.tomcat.maven.plugin.tomcat.run;
 
+import java.io.File;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -20,25 +22,127 @@ package org.apache.tomcat.maven.plugin.tomcat.run;
  */
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.tomcat.maven.common.config.AbstractWebapp;
 
 /**
- * Webapp represents information specified in the plugin configuration section
- * for each webapp.
+ * Webapp represents information specified in the plugin configuration section 
for each webapp.
  *
  * @since 2.0
  */
-public class Webapp
-    extends AbstractWebapp
-{
+public class Webapp {
+
+    /**
+     *
+     */
+    private String groupId;
+    /**
+     *
+     */
+    private String artifactId;
+    /**
+     *
+     */
+    private String version = null;
+    /**
+     *
+     */
+    private String type = "war";
+    /**
+     *
+     */
+    private String classifier;
+    /**
+     * @parameter
+     */
+    private String contextPath;
+    private Artifact artifact;
+    private File contextFile;
+    private boolean asWebapp = false;
 
-    public Webapp()
-    {
+    public Webapp() {
         // default constructor
     }
 
-    public Webapp( Artifact artifact )
-    {
-        super( artifact );
+    public Webapp(Artifact artifact) {
+        this.setArtifact(artifact);
+        this.setGroupId(artifact.getGroupId());
+        this.setArtifactId(artifact.getArtifactId());
+        this.setVersion(artifact.getVersion());
+        this.setClassifier(artifact.getClassifier());
+        this.setType(artifact.getType());
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId() {
+        return artifactId;
+    }
+
+    public void setArtifactId(String artifactId) {
+        this.artifactId = artifactId;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getClassifier() {
+        return classifier;
+    }
+
+    public void setClassifier(String classifier) {
+        this.classifier = classifier;
+    }
+
+    public String getContextPath() {
+        if (contextPath == null || contextPath.isEmpty()) {
+            return this.artifactId;
+        }
+        return contextPath;
+    }
+
+    public void setContextPath(String contextPath) {
+        this.contextPath = contextPath;
+    }
+
+    public Artifact getArtifact() {
+        return artifact;
+    }
+
+    public void setArtifact(Artifact artifact) {
+        this.artifact = artifact;
+    }
+
+    public void setContextFile(File contextFile) {
+        this.contextFile = contextFile;
+    }
+
+    public File getContextFile() {
+        return contextFile;
+    }
+
+    public boolean isAsWebapp() {
+        return asWebapp;
+    }
+
+    public void setAsWebapp(boolean asWebapp) {
+        this.asWebapp = asWebapp;
     }
 }


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

Reply via email to