From 4cc50d387f2042c897b22a4ae6bff2f556071ffe Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Fri, 10 Nov 2006 17:20:05 +0000 Subject: [PATCH] I'm still trying to stabilize the web.xml is optional policy. Maybe we just pull it. Here the problem is that if you try and where there already is one, there may not be an addedWebXmlFile. I would have thought isInUpdateMode would handle this, but it does not. Instead we remember tht a web.xml file was set on teh command line, and get away with it. I may also downgrade the error to a warning. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@473393 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/War.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/War.java b/src/main/org/apache/tools/ant/taskdefs/War.java index 9962320d0..8ae4ba6df 100644 --- a/src/main/org/apache/tools/ant/taskdefs/War.java +++ b/src/main/org/apache/tools/ant/taskdefs/War.java @@ -216,7 +216,7 @@ public class War extends Jar { * gets executed. */ protected void cleanUp() { - if (addedWebXmlFile == null && needxmlfile && !isInUpdateMode()) { + if (addedWebXmlFile == null && deploymentDescriptor==null && needxmlfile && !isInUpdateMode()) { throw new BuildException("No WEB-INF/web.xml file was added.\n" + "If this is your intent, set needxml='false' "); }