This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch s
in repository https://gitbox.apache.org/repos/asf/maven-war-plugin.git

commit 2fa56f825dc5fce5653207e11755553e1fb50dfb
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Mon Nov 24 05:39:17 2025 -0600

    Inline cargo cult constants
---
 src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java 
b/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java
index 709e2e7..a74db38 100644
--- a/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java
@@ -63,10 +63,8 @@ import 
org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
  * Contains common jobs for WAR mojos.
  */
 public abstract class AbstractWarMojo extends AbstractMojo {
-    private static final String META_INF = "META-INF";
 
-    private static final String WEB_INF = "WEB-INF";
-    /**
+  /**
      * Whether to fail the build if the <code>web.xml</code> file is missing. 
Set to <code>false</code> if you
      * want your WAR built without a <code>web.xml</code> file. This may be 
useful if you are building an overlay that
      * has no web.xml file.
@@ -417,12 +415,12 @@ public abstract class AbstractWarMojo extends 
AbstractMojo {
 
         // if webXML is specified, omit the one in the source directory
         if (webXml != null && StringUtils.isNotEmpty(webXml.getName())) {
-            excludeList.add("**/" + WEB_INF + "/web.xml");
+            excludeList.add("**/" + "WEB-INF" + "/web.xml");
         }
 
         // if contextXML is specified, omit the one in the source directory
         if (containerConfigXML != null && 
StringUtils.isNotEmpty(containerConfigXML.getName())) {
-            excludeList.add("**/" + META_INF + "/" + 
containerConfigXML.getName());
+            excludeList.add("**/" + "META-INF" + "/" + 
containerConfigXML.getName());
         }
 
         return excludeList.toArray(new String[excludeList.size()]);

Reply via email to