ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs BUnzip2.java BZip2.java Pack.java Unpack.java
Date Wed, 10 Apr 2002 14:14:00 GMT
bodewig     02/04/10 07:14:00

  Modified:    docs/manual/CoreTasks pack.html
               src/main/org/apache/tools/ant/taskdefs BUnzip2.java
                        BZip2.java Pack.java Unpack.java
  Log:
  Make sure the dest attribute gets reset at the end of execute in
  <bunzip2> and <gunzip> (bug 7552 audit).
  
  Fix documentation for <gzip> and <bzip2> - these tasks perform
  dependency checks.
  
  Revision  Changes    Path
  1.5       +3 -3      jakarta-ant/docs/manual/CoreTasks/pack.html
  
  Index: pack.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/pack.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- pack.html	3 Feb 2002 22:00:42 -0000	1.4
  +++ pack.html	10 Apr 2002 14:13:59 -0000	1.5
  @@ -10,8 +10,8 @@
   <h2><a name="pack">GZip/BZip2</a></h2>
   <h3>Description</h3>
   <p>Packs a file using the GZip or BZip2 algorithm.
  -These tasks do not do any dependency checking; the output file is 
  -always generated</p>
  +The output file is only generated if it doesn't exist or the source
  +file is newer.</p>
   <h3>Parameters</h3>
   <table border="1" cellpadding="2" cellspacing="0">
     <tr>
  @@ -40,7 +40,7 @@
     /&gt;</code></p>
   </blockquote>
   <hr>
  -<p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
  +<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All
rights
   Reserved.</p>
   
   </body>
  
  
  
  1.6       +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java
  
  Index: BUnzip2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BUnzip2.java	3 Mar 2002 01:46:20 -0000	1.5
  +++ BUnzip2.java	10 Apr 2002 14:13:59 -0000	1.6
  @@ -69,6 +69,8 @@
    *
    * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
    *
  + * @since Ant 1.5
  + *
    * @ant.task category="packaging"
    */
   
  
  
  
  1.7       +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/BZip2.java
  
  Index: BZip2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/BZip2.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BZip2.java	10 Apr 2002 00:19:54 -0000	1.6
  +++ BZip2.java	10 Apr 2002 14:13:59 -0000	1.7
  @@ -67,6 +67,8 @@
    *
    * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
    *
  + * @since Ant 1.5
  + *
    * @ant.task category="packaging"
    */
   
  
  
  
  1.6       +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Pack.java
  
  Index: Pack.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Pack.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Pack.java	28 Feb 2002 12:39:58 -0000	1.5
  +++ Pack.java	10 Apr 2002 14:13:59 -0000	1.6
  @@ -67,6 +67,8 @@
    * Abstract Base class for pack tasks.
    *
    * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
  + *
  + * @since Ant 1.5
    */
   
   public abstract class Pack extends Task {
  
  
  
  1.9       +10 -3     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Unpack.java
  
  Index: Unpack.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Unpack.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Unpack.java	25 Jan 2002 16:15:44 -0000	1.8
  +++ Unpack.java	10 Apr 2002 14:13:59 -0000	1.9
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -63,6 +63,8 @@
    * Abstract Base class for unpack tasks.
    *
    * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
  + *
  + * @since 1.5
    */
   
   public abstract class Unpack extends Task {
  @@ -139,8 +141,13 @@
       }
   
       public void execute() throws BuildException {
  -        validate();
  -        extract();
  +        File savedDest = dest; // may be altered in validate
  +        try {
  +            validate();
  +            extract();
  +        } finally {
  +            dest = savedDest;
  +        }
       }
   
       protected abstract String getDefaultExtension();
  
  
  

--
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