ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: ant/docs faq.html
Date Wed, 14 Apr 2004 06:40:08 GMT
jhm         2004/04/13 23:40:08

  Modified:    xdocs    faq.xml
               docs     faq.html
  Log:
  Add macrodef-solution to 'propertycopy'. Thanks Stefan
  
  Revision  Changes    Path
  1.52      +12 -1     ant/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/ant/xdocs/faq.xml,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- faq.xml	15 Mar 2004 11:23:48 -0000	1.51
  +++ faq.xml	14 Apr 2004 06:40:08 -0000	1.52
  @@ -581,6 +581,17 @@
   ]]></source>
            <p>With AntContrib (external task library) you can do <code>
            &lt;propertycopy name="prop" from="${anotherprop}"/&gt;</code>.</p>
  +         <p>With Ant 1.6 you can simulate the AntContribs &lt;propertycopy&gt;
  +         and avoid the need of an external library:</p>
  +        <source><![CDATA[
  +<macrodef name="propertycopy">
  +  <attribute name="name"/>
  +  <attribute name="from"/>
  +  <sequential>
  +    <property name="@{name}" value="${@{from}}"/>
  +  </sequential>
  +</macrodef>
  +]]></source>
         </answer>
       </faq>
     </faqsection>
  @@ -1426,4 +1437,4 @@
       </faq>
     </faqsection>
   
  -</document>
  +</document>
  \ No newline at end of file
  
  
  
  1.96      +11 -0     ant/docs/faq.html
  
  Index: faq.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/faq.html,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- faq.html	15 Mar 2004 11:23:48 -0000	1.95
  +++ faq.html	14 Apr 2004 06:40:08 -0000	1.96
  @@ -917,6 +917,17 @@
   </pre>
                           <p>With AntContrib (external task library) you can do <code>
            &lt;propertycopy name="prop" from="${anotherprop}"/&gt;</code>.</p>
  +                        <p>With Ant 1.6 you can simulate the AntContribs &lt;propertycopy&gt;
  +         and avoid the need of an external library:</p>
  +                        <pre class="code">
  +&lt;macrodef name=&quot;propertycopy&quot;&gt;
  +  &lt;attribute name=&quot;name&quot;/&gt;
  +  &lt;attribute name=&quot;from&quot;/&gt;
  +  &lt;sequential&gt;
  +    &lt;property name=&quot;@{name}&quot; value=&quot;${@{from}}&quot;/&gt;
  +  &lt;/sequential&gt;
  +&lt;/macrodef&gt;
  +</pre>
                                   <p class="faq">
         <a name="always-recompiles"></a>
         Why does Ant always recompile all my Java files?
  
  
  

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


Mime
View raw message