| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <html> |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"></meta> |
| <link rel="stylesheet" type="text/css" href="style.css"> |
| <title>NAnt Task</title> |
| </head> |
| |
| <body> |
| <h2><a name="nant">NAnt</a></h2> |
| |
| <h3>Description</h3> |
| |
| <p>Runs the <a href="http://nant.sourceforge.net/">NAnt</a> build |
| tool.</p> |
| |
| <p>You can either use an existing build file or nest a build file |
| (snippet) as a child into the task. If you don't specify either, |
| NAnt's default build file search algorithm will apply.</p> |
| |
| <h3>Parameters</h3> |
| <table border="1" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td valign="top"><b>Attribute</b></td> |
| <td valign="top"><b>Description</b></td> |
| <td align="center" valign="top"><b>Required</b></td> |
| </tr> |
| <tr> |
| <td valign="top">buildfile</td> |
| <td valign="top">External build file to invoke NAnt on.</td> |
| <td align="center">No.</td> |
| </tr> |
| <tr> |
| <td valign="top">vm</td> |
| <td valign="top">Same as <a |
| href="dotnetexec.html">dotnetexec</a>'s vm attribute. |
| Specify the framework to use.</td> |
| <td align="center">No.</td> |
| </tr> |
| <tr> |
| <td valign="top">failOnError</td> |
| <td valign="top">Stops the build if NAnt returns with a code |
| indicating an error.</td> |
| <td align="center">No - defaults to true.</td> |
| </tr> |
| <tr> |
| <td valign="top">errorProperty</td> |
| <td valign="top">Name of the Ant property to set if NAnt |
| indicated an error. Only useful if the failOnError attribute |
| is set to false.</td> |
| <td align="center">No.</td> |
| </tr> |
| </table> |
| |
| <h3>Parameters specified as nested elements</h3> |
| <h4>target</h4> |
| |
| <p><code>target</code> has a single required attribute name - |
| specifies a target to be run.</p> |
| |
| <h4>property</h4> |
| |
| <p><code>property</code> has two required attributes. name and |
| value that specify name and value of a property that is to be |
| defined in the NAnt invocation.</p> |
| |
| <h4>build</h4> |
| |
| <p>This element allows no attributes. You can nest a NAnt build |
| file into it and NAnt will be executed on that. You can also nest |
| a build file snippet instead and Ant will wrap the necessary NAnt |
| <code><project> around it.</code></p> |
| |
| <h3>Examples</h3> |
| |
| <p>Let NAnt search for a *.build file in the (Ant) project's base |
| directory and execute the default target in it:</p> |
| |
| <pre><nant/></pre> |
| |
| <p>Let NAnt execute the targets named foo and bar in the build |
| file nant.build in Ant's basedir and pass the property |
| <code>-D:test=testvalue</code> to it:</p> |
| |
| <pre> |
| <nant buildfile="nant.build"> |
| <target name="foo"/> |
| <target name="bar"/> |
| <property name="test" value="testvalue"/> |
| </nant> |
| </pre> |
| |
| <p>Define a build file embeded into the task, let NAnt execute the |
| echo target of that build file.</p> |
| |
| <pre> |
| <nant> |
| <target name="echo"> |
| <build> |
| <project basedir="." default="empty"> |
| <target name="empty"/> |
| <target name="echo"> |
| <echo message="this is NAnt"/> |
| </target> |
| </project> |
| </build> |
| </nant> |
| </pre> |
| |
| <p>Run NAnt's echo task:</p> |
| |
| <pre> |
| <nant> |
| <build> |
| <echo message="this is NAnt"/> |
| </build> |
| </nant> |
| </pre> |
| |
| <p class="copyright"> |
| Apache Ant, Apache .NET Ant Library, Ant, .NET Ant Library, Apache, the Apache feather logo, and the Apache Ant project logos are trademarks of The Apache Software Foundation. |
| </p> |
| </body> |
| </html> |