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/types Commandline.java
Date Fri, 04 Oct 2002 11:59:49 GMT
bodewig     2002/10/04 04:59:49

  Modified:    .        WHATSNEW
               docs/manual using.html
               src/main/org/apache/tools/ant/types Commandline.java
  Log:
  Add pathref attribute to <arg>.
  
  PR: 13137
  
  Revision  Changes    Path
  1.298     +3 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.297
  retrieving revision 1.298
  diff -u -r1.297 -r1.298
  --- WHATSNEW	4 Oct 2002 08:32:12 -0000	1.297
  +++ WHATSNEW	4 Oct 2002 11:59:48 -0000	1.298
  @@ -49,6 +49,9 @@
   
   * OS/400 now gets detected by the os condition.
   
  +* <arg> has a new attribute pathref that can be used to reference
  +  previously defined paths.
  +
   Changes from Ant 1.5.1Beta1 to 1.5.1
   ====================================
   
  
  
  
  1.27      +7 -1      jakarta-ant/docs/manual/using.html
  
  Index: using.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/using.html,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- using.html	9 Aug 2002 08:49:45 -0000	1.26
  +++ using.html	4 Oct 2002 11:59:48 -0000	1.27
  @@ -429,7 +429,7 @@
       <td valign="top">value</td>
       <td valign="top">a single command-line argument; can contain space
         characters.</td>
  -    <td align="center" rowspan="4">Exactly one of these.</td>
  +    <td align="center" rowspan="5">Exactly one of these.</td>
     </tr>
     <tr>
       <td valign="top">file</td>
  @@ -442,6 +442,12 @@
         string as a single command-line argument; you can use <code>;</code>
         or <code>:</code> as
         path separators and Ant will convert it to the platform's local
  +      conventions.</td>
  +  </tr>
  +  <tr>
  +    <td valign="top">pathref</td>
  +    <td valign="top"><a href="#references">Reference</a> to a path
  +      defined elsewhere.  Ant will convert it to the platform's local
         conventions.</td>
     </tr>
     <tr>
  
  
  
  1.25      +15 -1     jakarta-ant/src/main/org/apache/tools/ant/types/Commandline.java
  
  Index: Commandline.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Commandline.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Commandline.java	9 Aug 2002 08:49:45 -0000	1.24
  +++ Commandline.java	4 Oct 2002 11:59:49 -0000	1.25
  @@ -58,6 +58,7 @@
   import java.util.StringTokenizer;
   import java.util.Vector;
   import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.ProjectComponent;
   import org.apache.tools.ant.util.StringUtils;
   
   
  @@ -113,7 +114,7 @@
       /**
        * Used for nested xml command line definitions.
        */
  -    public static class Argument {
  +    public static class Argument extends ProjectComponent {
   
           private String[] parts;
   
  @@ -147,6 +148,19 @@
            */
           public void setPath(Path value) {
               parts = new String[] {value.toString()};
  +        }
  +
  +        /**
  +         * Sets a single commandline argument from a reference to a
  +         * path - ensures the right separator for the local platform
  +         * is used.
  +         *
  +         * @param value a single commandline argument.
  +         */
  +        public void setPathref(Reference value) {
  +            Path p = new Path(getProject());
  +            p.setRefid(value);
  +            parts = new String[] {p.toString()};
           }
   
           /**
  
  
  

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