ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs War.java
Date Fri, 21 Jun 2002 06:30:46 GMT
stevel      2002/06/20 23:30:46

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        War.java
  Log:
  more javadoc updates.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.23.2.1  +38 -2     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/War.java
  
  Index: War.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/War.java,v
  retrieving revision 1.23
  retrieving revision 1.23.2.1
  diff -u -r1.23 -r1.23.2.1
  --- War.java	15 Apr 2002 13:36:17 -0000	1.23
  +++ War.java	21 Jun 2002 06:30:46 -0000	1.23.2.1
  @@ -64,17 +64,32 @@
   
   
   /**
  - * Creates a WAR archive.
  + * An extension of <jar> to create a WAR archive.
  + * Contains special treatment for files that should end up in the
  + * <code>WEB-INF/lib</code>, <code>WEB-INF/classes</code> or
  + * <code>WEB-INF</code> directories of the Web Application Archive.</p>
  + * <p>(The War task is a shortcut for specifying the particular layout of a WAR file.

  + * The same thing can be accomplished by using the <i>prefix</i> and <i>fullpath</i>
  + * attributes of zipfilesets in a Zip or Jar task.)</p>
  + * <p>The extended zipfileset element from the zip task (with attributes <i>prefix</i>,
<i>fullpath</i>, and <i>src</i>) is available in the War task.</p>
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    *
    * @since Ant 1.2
    *
    * @ant.task category="packaging"
  + * @see Jar
    */
   public class War extends Jar {
   
  +    /**
  +     * our web.xml deployment descriptor
  +     */
       private File deploymentDescriptor;
  +    
  +    /**
  +     * flag set if the descriptor is added
  +     */
       private boolean descriptorAdded;
   
       public War() {
  @@ -84,14 +99,18 @@
       }
   
       /**
  +     * <i>Deprecated<i> name of the file to create 
  +     * -use <tt>destfile</tt> instead. 
        * @deprecated Use setDestFile(File) instead
  +     * @ant attribute ignored="true"
        */
       public void setWarfile(File warFile) {
           setDestFile(warFile);
       }
   
       /**
  -     * set the web app descriptor for this WAR file
  +     * set the deployment descriptor to use (WEB-INF/web.xml);
  +     * required unless <tt>update=true</tt>
        */
       public void setWebxml(File descr) {
           deploymentDescriptor = descr;
  @@ -109,24 +128,38 @@
           super.addFileset(fs);
       }
   
  +    /**
  +     * add files under WEB-INF/lib/
  +     */
  +     
       public void addLib(ZipFileSet fs) {
           // We just set the prefix for this fileset, and pass it up.
           fs.setPrefix("WEB-INF/lib/");
           super.addFileset(fs);
       }
   
  +    /**
  +     * add files under WEB-INF/classes
  +     */
       public void addClasses(ZipFileSet fs) {
           // We just set the prefix for this fileset, and pass it up.
           fs.setPrefix("WEB-INF/classes/");
           super.addFileset(fs);
       }
   
  +    /**
  +     * files to add under WEB-INF; 
  +     */
       public void addWebinf(ZipFileSet fs) {
           // We just set the prefix for this fileset, and pass it up.
           fs.setPrefix("WEB-INF/");
           super.addFileset(fs);
       }
   
  +    /**
  +     * override of  parent; validates configuration
  +     * before initializing the output stream.
  +     */
       protected void initZipOutputStream(ZipOutputStream zOut)
           throws IOException, BuildException {
           // If no webxml file is specified, it's an error.
  @@ -137,6 +170,9 @@
           super.initZipOutputStream(zOut);
       }
   
  +    /**
  +     * add another file to the stream
  +     */
       protected void zipFile(File file, ZipOutputStream zOut, String vPath)
           throws IOException {
           // If the file being added is WEB-INF/web.xml, we warn if it's
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message