ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Available.java KeySubst.java
Date Thu, 14 Sep 2000 10:50:06 GMT
bodewig     00/09/14 03:50:04

  Modified:    docs     index.html
               src/main/org/apache/tools/ant/taskdefs Available.java
                        KeySubst.java
  Log:
  Added value attribute to <available>.
  Submitted by:	Glenn McAllister <glennm@ca.ibm.com>
  
  Revision  Changes    Path
  1.100     +8 -2      jakarta-ant/docs/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/index.html,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- index.html	2000/09/14 07:19:51	1.99
  +++ index.html	2000/09/14 10:49:49	1.100
  @@ -961,8 +961,9 @@
   <h3>Description</h3>
   <p>Sets a property if a resource is available at runtime. This resource can be a
   file resource, a class in classpath or a JVM system resource.</p>
  -<p>The value part of the properties being set is <i>true</i> if the resource
is
  -present, otherwise, the property is not set.</p>
  +<p>If the resource is present, the property value is set to true by
  +default, otherwise the property is not set.  You can set the value to
  +something specific by using the value attribute.</p>
   <p>Normally, this task is used to set properties that are useful to avoid target
   execution depending on system parameters.</p>
   <h3>Parameters</h3>
  @@ -977,6 +978,11 @@
       <td valign="top">the name of the property to set.</td>
       <td valign="top" align="center">Yes</td>
     </tr>
  +  <tr>
  +    <td valign="top">value</td>
  +    <td valign="top">the value to set the property to. Defaults to "true".</td>
  +    <td valign="top" align="center">No</td>
  +  </tr>
     <tr>
       <td valign="top">classname</td>
       <td valign="top">the class to look for in classpath.</td>
  
  
  
  1.10      +4 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java
  
  Index: Available.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Available.java	2000/09/14 07:19:52	1.9
  +++ Available.java	2000/09/14 10:49:54	1.10
  @@ -70,16 +70,14 @@
       private String classname;
       private File file;
       private String resource;
  +    private String value = "true";
   
       public void setProperty(String property) {
           this.property = property;
       }
   
  -    public void XsetClass(String classname) {
  -        log("The class attribute is deprecated. " +
  -            "Please use the classname attribute.",
  -            Project.MSG_WARN);
  -        this.classname = classname;
  +    public void setValue(String value) {
  +        this.value = value;
       }
   
       public void setClassname(String classname) {
  @@ -99,7 +97,7 @@
           if ((file != null) && !checkFile(file)) return;
           if ((resource != null) && !checkResource(resource)) return;
   
  -        this.project.setProperty(property, "true");
  +        this.project.setProperty(property, value);
       }
   
       private boolean checkFile(File file) {
  
  
  
  1.4       +3 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/KeySubst.java
  
  Index: KeySubst.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/KeySubst.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- KeySubst.java	2000/07/06 16:48:17	1.3
  +++ KeySubst.java	2000/09/14 10:49:55	1.4
  @@ -65,6 +65,8 @@
    * setKeys method to understand how to do the substitutions.
    *
    * @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
  + *
  + * @deprecated KeySubst is deprecated. Use Filter + CopyDir instead.
    */
   public class KeySubst extends Task {
       private File source = null;
  @@ -200,4 +202,4 @@
           finalString.append (origString.substring(i));
           return finalString.toString();
       }
  -}
  \ No newline at end of file
  +}
  
  
  

Mime
View raw message