ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/docs/manual using.html
Date Tue, 31 May 2005 15:30:53 GMT
mbenson     2005/05/31 08:30:53

  Modified:    docs/manual/CoreTasks property.html
               docs/manual using.html
  Log:
  Clearly (hopefully) document '$'-escaping relating to Ant properties;
  increase findability of this information by linking from property task.
  PR: 34534
  
  Revision  Changes    Path
  1.23      +2 -1      ant/docs/manual/CoreTasks/property.html
  
  Index: property.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/CoreTasks/property.html,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- property.html	29 Apr 2005 18:58:13 -0000	1.22
  +++ property.html	31 May 2005 15:30:53 -0000	1.23
  @@ -10,7 +10,8 @@
   
   <h2><a name="property">Property</a></h2>
   <h3>Description</h3>
  -<p>Sets a property (by name and value), or set of properties (from file or
  +<p>Sets a <a href="../using.html#properties">property</a>
  +(by name and value), or set of properties (from file or
   resource) in the project.  Properties are case sensitive.</p>
    Properties are immutable: whoever sets a property first freezes it for the
    rest of the build; they are most definitely not variable.
  
  
  
  1.43      +13 -0     ant/docs/manual/using.html
  
  Index: using.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/using.html,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- using.html	25 May 2005 22:14:51 -0000	1.42
  +++ using.html	31 May 2005 15:30:53 -0000	1.43
  @@ -245,6 +245,19 @@
   &quot;build&quot;, then this could be used in an attribute like this:
   <code>${builddir}/classes</code>.
   This is resolved at run-time as <code>build/classes</code>.</p>
  +<p>In the event you should need to include this construct literally
  +(i.e. without property substitutions), simply "escape" the '$' character
  +by doubling it. To continue the previous example:
  +<pre>  &lt;echo&gt;$${builddir}=${builddir}&lt;/echo&gt;</pre>
  +will echo this message:
  +<pre>  ${builddir}=build/classes</pre></p>
  +<p>In order to maintain backward compatibility with older Ant releases,
  +a single '$' character encountered apart from a property-like construct
  +(including a matched pair of french braces) will be interpreted literally;
  +that is, as '$'.  The "correct" way to specify this literal character,
  +however, is by using the escaping mechanism unconditionally, so that "$$"
  +is obtained by specifying "$$$$".  Mixing the two approaches yields
  +unpredictable results, as "$$$" results in "$$".</p>
   
   <h3><a name="built-in-props">Built-in Properties</a></h3>
   <p>Ant provides access to all system properties as if they had been
  
  
  

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


Mime
View raw message