ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hol...@apache.org
Subject cvs commit: jakarta-ant/docs/manual running.html
Date Thu, 20 Jun 2002 18:22:23 GMT
holtdl      2002/06/20 11:22:23

  Modified:    docs/manual Tag: ANT_15_BRANCH running.html
  Log:
  Add note about -find (and some general clean-up tweaks).
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.13.2.2  +68 -49    jakarta-ant/docs/manual/running.html
  
  Index: running.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/running.html,v
  retrieving revision 1.13.2.1
  retrieving revision 1.13.2.2
  diff -u -r1.13.2.1 -r1.13.2.2
  --- running.html	3 May 2002 09:40:28 -0000	1.13.2.1
  +++ running.html	20 Jun 2002 18:22:22 -0000	1.13.2.2
  @@ -15,34 +15,49 @@
   <code>ant</code>.</p>
   <p>When no arguments are specified, Ant looks for a <code>build.xml</code>
   file in the current directory and, if found, uses that file as the
  -buildfile and runs the &quot;default&quot; target.
  -If you use the <code>-find</code> option,
  -Ant will search for a buildfile first in the current directory, then in
  -the parent directory, and so on, until either a buildfile is found or the root
  -of the filesystem has been reached. To make Ant use
  -a buildfile other than <code>build.xml</code>, use the command-line
  -option <code>-buildfile <i>file</i></code>,
  -where <i>file</i> is the name of the buildfile you want to use.</p>
  -
  -<p>You can also set <a href="using.html#properties">properties</a> that
  -override properties specified in the
  -buildfile (see the <a href="CoreTasks/property.html">property</a> task).
  -This can be done with
  +build file and runs the target specified in the <code>default</code>
  +attribute of the <code>&lt;project&gt;</code> tag.
  +To make Ant use
  +a build file other than <code>build.xml</code>, use the command-line
  +option <nobr><code>-buildfile <i>file</i></code></nobr>,
  +where <i>file</i> is the name of the build file you want to use.</p>
  +If you use the <nobr><code>-find [<i>file</i>]</code></nobr>
option,
  +Ant will search for a build file first in the current directory, then in
  +the parent directory, and so on, until either a build file is found or the root
  +of the filesystem has been reached. By default, it will look for a build file
  +called <code>build.xml</code>. To have it search for a build file other
  +than <code>build.xml</code>, specify a file argument.
  +<strong>Note:</strong> If you include any other flags or arguments
  +on the command line after
  +the <nobr><code>-find</code></nobr> flag, you must include the
file argument
  +for the <nobr><code>-find</code></nobr> flag, even if the name
of the
  +build file you want to find is <code>build.xml</code>.
  +
  +<p>You can also set <a href="using.html#properties">properties</a> on
the
  +command line.  This can be done with
   the <nobr><code>-D<i>property</i>=<i>value</i></code></nobr>
option,
   where <i>property</i> is the name of the property,
  -and <i>value</i> is the value for that property.
  -This can also be used to pass in the value of environment variables.
  -Just pass <nobr><code>-DMYVAR=%MYVAR%</code></nobr> (Windows) or
  +and <i>value</i> is the value for that property. If you specify a
  +property that is also set in the build file
  +(see the <a href="CoreTasks/property.html">property</a> task),
  +the value specified on the
  +command line will override the value specified in the
  +build file.
  +Defining properties on the command line can also be used to pass in
  +the value of environment variables - just pass
  +<nobr><code>-DMYVAR=%MYVAR%</code></nobr> (Windows) or
   <nobr><code>-DMYVAR=$MYVAR</code></nobr> (Unix)
  -to Ant - you can then access
  -these variables inside your buildfile as <code>${MYVAR}</code>.
  -You can also access environment variables using the <a href="CoreTasks/property.html">
  -property</a> task.
  +to Ant. You can then access
  +these variables inside your build file as <code>${MYVAR}</code>.
  +You can also access environment variables using the
  +<a href="CoreTasks/property.html"> property</a> task's
  +<code>environment</code> attribute.
   </p>
   
  -<p>Options that affect the amount of logging output by Ant are: <nobr><code>-quiet</code></nobr>,
  +<p>Options that affect the amount of logging output by Ant are:
  +<nobr><code>-quiet</code></nobr>,
   which instructs Ant to print less
  -information on the console when running;
  +information to the console;
   <nobr><code>-verbose</code></nobr>, which causes Ant to print
   additional information to the console; and <nobr><code>-debug</code></nobr>,
   which causes Ant to print considerably more additional information.
  @@ -55,9 +70,10 @@
   used.</p>
   
   <p>The <nobr><code>-projecthelp</code></nobr> option prints
out a list
  -of the buildfile's targets, along with the
  -text in the <code>description</code> attribute of the target,
  -if one was specified, followed by a list of those targets without one.</p>
  +of the build file's targets. Targets that include a
  +<code>description</code> attribute are listed as &quot;Main targets&quot;,
  +those without a <code>description</code> are listed as
  +&quot;Subtargets&quot;, then the &quot;Default&quot; target is listed.
   
   <h3><a name="options">Command-line Options Summary</a></h3>
   <pre>ant [options] [target [target2 [target3] ...]]
  @@ -69,22 +85,22 @@
     -verbose               be extra verbose
     -debug                 print debugging information
     -emacs                 produce logging information without adornments
  -  -logfile &lt;file&gt;        use given file for log
  -  -logger &lt;classname&gt;    the class which is to perform logging
  -  -listener &lt;classname&gt;  add an instance of class as a project listener
  -  -buildfile &lt;file&gt;      use given buildfile
  +  -logfile &lt;file&gt;        write logging output to given file
  +  -logger &lt;classname&gt;    the class that is to perform logging
  +  -listener &lt;classname&gt;  add an instance of <i>classname</i>
as a project listener
  +  -buildfile &lt;file&gt;      use given build file
     -D&lt;property&gt;=&lt;value&gt;   use value for given property
  -  -propertyfile &lt;name&gt;   load all properties from file with -D
  -                         properties taking precedence
  -  -inputhandler &lt;class&gt;  the class which will handle input requests
  -  -find &lt;file&gt;           search for buildfile towards the root of the
  -                         filesystem and use it
  +  -propertyfile &lt;file&gt;   load all properties from <i>file</i>
(with -D taking precedence)
  +  -inputhandler &lt;class&gt;  the class that will handle input requests
  +  -find [&lt;file&gt;]         search for build.xml, or <i>file</i>,
towards the root of the
  +                         filesystem
   </pre>
   <p>For more information about <code>-logger</code> and
  -<code>-listener</code> see the section <a
  -href="listeners.html">Loggers &amp; Listeners</a>
  -<p>For more information about <code>-inputhandler</code> see the
  -section <a href="inputhandler.html">InputHandler</a>
  +<code>-listener</code> see
  +<a href="listeners.html">Loggers &amp; Listeners</a>.
  +<p>For more information about <code>-inputhandler</code> see
  +<a href="inputhandler.html">InputHandler</a>.
  +
   <h3>Examples</h3>
   <blockquote>
     <pre>ant</pre>
  @@ -99,23 +115,23 @@
   <blockquote>
     <pre>ant -buildfile test.xml dist</pre>
   </blockquote>
  -<p>runs Ant using the <code>test.xml</code> file in the current directory,
on a
  -target called <code>dist</code>.</p>
  +<p>runs Ant using the <code>test.xml</code> file in the current directory,
on
  +the target called <code>dist</code>.</p>
   <blockquote>
     <pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre>
   </blockquote>
  -<p>runs Ant using the <code>test.xml</code> file in the current directory,
on a
  -target called <code>dist</code>, setting the <code>build</code>
property to the
  -value <code>build/classes</code>.</p>
  +<p>runs Ant using the <code>test.xml</code> file in the current directory,
on
  +the target called <code>dist</code>, setting the <code>build</code>
property
  +to the value <code>build/classes</code>.</p>
   
   <h3><a name="files">Files</a></h3>
   
   <p>The Ant wrapper script for Unix will source (read and evaluate) the
  -file <code>~/.antrc</code> before it does anything - the Windows batch
  -file invokes <code>%HOME%\antrc_pre.bat</code> at the start and
  +file <code>~/.antrc</code> before it does anything. On Windows, the Ant
  +wrapper batch-file invokes <code>%HOME%\antrc_pre.bat</code> at the start and
   <code>%HOME%\antrc_post.bat</code> at the end.  You can use these
  -files to set/unset environment variables that should only be visible
  -during the execution of Ant.  See the next section for example.</p>
  +files, for example, to set/unset environment variables that should only be
  +visible during the execution of Ant.  See the next section for examples.</p>
   
   <h3><a name="envvars">Environment Variables</a></h3>
   
  @@ -131,8 +147,11 @@
     the maximum Java heap size here.</li>
   
     <li><code>ANT_ARGS</code> - Ant command-line arguments. For example,
  -  set <code>ANT_ARGS</code> to point to a different logger and to
  -  include the <code>-find</code> flag.</li>
  +  set <code>ANT_ARGS</code> to point to a different logger, include a
  +  listener, and to include the <code>-find</code> flag.</li>
  +  <strong>Note:</strong> If you include <code>-find</code>
  +  in <code>ANT_ARGS</code>, you should include the name of the build file
  +  to find, even if the file is called <code>build.xml</code>.
   </ul>
   
   <h2><a name="viajava">Running Ant via Java</a></h2>
  
  
  

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