From fef46698fb24852247a894d2c19e4f2fe8990a45 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 19 Sep 2000 14:29:44 +0000 Subject: [PATCH] Make use the .war directory layout. Don't ask me where my mind has been. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268010 13f79535-47bb-0310-9956-ffa450edef68 --- docs/index.html | 12 ++++++------ src/main/org/apache/tools/ant/taskdefs/War.java | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/index.html b/docs/index.html index fa349a5b8..a4409b74d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3807,8 +3807,8 @@ carried from tarfile.

War

Description

An extension of the Jar task with special -treatment for files that should end up in the lib, -classes or WEB-INF directories of the Web +treatment for files that should end up in the WEB-INF/lib, +WEB-INF/classes or WEB-INF directories of the Web Application Archive.

Parameters

@@ -3882,11 +3882,11 @@ Application Archive.

lib

The nested lib element specifies a FileSet. All files included in this fileset will -end up in the lib directory of the war file.

+end up in the WEB-INF/lib directory of the war file.

classes

The nested classes element specifies a FileSet. All files included in this fileset will -end up in the classes directory of the war file.

+end up in the WEB-INF/classes directory of the war file.

webinf

The nested webinf element specifies a FileSet. All files included in this fileset will @@ -3917,8 +3917,8 @@ then the war file myapp.war created with will consist of

 WEB-INF/web.xml
-lib/jdbc2.jar
-classes/com/myco/myapp/Servlet.class
+WEB-INF/lib/jdbc2.jar
+WEB-INF/classes/com/myco/myapp/Servlet.class
 META-INF/MANIFEST.MF
 index.html
 front.jsp
diff --git a/src/main/org/apache/tools/ant/taskdefs/War.java b/src/main/org/apache/tools/ant/taskdefs/War.java
index 953057965..f8e881e14 100644
--- a/src/main/org/apache/tools/ant/taskdefs/War.java
+++ b/src/main/org/apache/tools/ant/taskdefs/War.java
@@ -116,8 +116,8 @@ public class War extends Jar {
             throw new BuildException("webxml attribute is required", location);
  	}
 
-        addFiles(libFileSets, zOut, "lib/");
-        addFiles(classesFileSets, zOut, "classes/");
+        addFiles(libFileSets, zOut, "WEB-INF/lib/");
+        addFiles(classesFileSets, zOut, "WEB-INF/classes/");
         addFiles(webInfFileSets, zOut, "WEB-INF/");
 
         super.initZipOutputStream(zOut);