Browse Source

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 <war> 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
master
Steve Loughran 19 years ago
parent
commit
4cc50d387f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/War.java

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/War.java View File

@@ -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' ");
}


Loading…
Cancel
Save