git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275716 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -0,0 +1,32 @@ | |||||
| <html> | |||||
| <head> | |||||
| <meta http-equiv="Content-Language" content="en-us"></meta> | |||||
| <title>DotNetExec Task</title> | |||||
| </head> | |||||
| <body> | |||||
| <h2><a name="dotnetexec">DotNetExec</a></h2> | |||||
| <h3>Description</h3> | |||||
| <p>Executes a .NET assembly that's on your PATH or pointed to | |||||
| directly by the executable attribute.</p> | |||||
| <p>This task is an extension of Ant's <a | |||||
| href="http://ant.apache.org/manual/CoreTasks/exec.html">exec</a> | |||||
| task and supports all attributes and nested child elements of that | |||||
| task. Use the executable attribute to specify the name of the | |||||
| assembly (including the extension).</p> | |||||
| <p>This task allows you to choose the .NET framework via the | |||||
| <code>vm</code> attribute. The default value is "microsoft" on | |||||
| Windows and "mono" on all other platforms. "microsoft" is a magic | |||||
| name that means "run the assembly as executable directly" - this | |||||
| may also work for Mono on Linux systems with the binfmt feature | |||||
| described in the <a | |||||
| href="http://www.go-mono.org/faq.html#q86">Mono FAQ</a>.</p> | |||||
| <hr/> | |||||
| <p align="center">Copyright © 2003 Apache Software Foundation. All rights Reserved.</p> | |||||
| </body> | |||||
| </html> | |||||
| @@ -0,0 +1,119 @@ | |||||
| <html> | |||||
| <head> | |||||
| <meta http-equiv="Content-Language" content="en-us"></meta> | |||||
| <title>Dotnet Ant Library</title> | |||||
| </head> | |||||
| <body> | |||||
| <h2>Introduction</h2> | |||||
| <p>This is a library of Ant tasks that support using .NET | |||||
| executables accross different platforms and in particular support | |||||
| using common .NET development tools like <a | |||||
| href="http://nant.sourceforge.net/">NAnt</a> from within Ant.</p> | |||||
| <h2>Requirements</h2> | |||||
| <p>The current version will only work for a CVS build of Ant | |||||
| created from CVS HEAD (i.e. after Ant 1.6's feature freeze) of | |||||
| 2003-11-27 or later. A version that can work with Ant 1.6 may be | |||||
| provided at a later stage. This task library is never going to | |||||
| work with Ant < 1.6.</p> | |||||
| <h2>Installation</h2> | |||||
| <p>If you are building this from sources, run the antlib target | |||||
| and you'll get a file <code>dotnet.jar</code>. If you've | |||||
| downloaded <code>dotnet.jar</code>, you are already ready.</p> | |||||
| <p>There are several ways to use the tasks:</p> | |||||
| <ul> | |||||
| <li>The traditional way: | |||||
| <pre> | |||||
| <taskdef | |||||
| resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"> | |||||
| <classpath> | |||||
| <pathelement location="YOUR-PATH-TO/dotnet.jar"/> | |||||
| </classpath> | |||||
| </taskdef> | |||||
| </pre> | |||||
| With this you can use the tasks like plain Ant tasks, they'll | |||||
| live in the default namespace. I.e. if you can run | |||||
| <exec> without any namespace prefix, you can do so for | |||||
| <dotnetexec> as well. | |||||
| </li> | |||||
| <li>Similar, but assigning a namespace URI | |||||
| <pre> | |||||
| <taskdef | |||||
| uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" | |||||
| resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"> | |||||
| <classpath> | |||||
| <pathelement location="YOUR-PATH-TO/dotnet.jar"/> | |||||
| </classpath> | |||||
| </taskdef> | |||||
| </pre> | |||||
| This puts you task into a separate namespace than Ant's | |||||
| namespace. You would use the tasks like | |||||
| <pre> | |||||
| <project | |||||
| xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" | |||||
| xmlns="antlib:org.apache.tools.ant"> | |||||
| ... | |||||
| <dn:nant> | |||||
| <dn:target name="my-target"/> | |||||
| </dn:nant> | |||||
| </pre> | |||||
| or | |||||
| <pre> | |||||
| <nant xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"> | |||||
| <target name="my-target"/> | |||||
| </nant> | |||||
| </pre> | |||||
| or a variation thereof. | |||||
| </li> | |||||
| <li>Using Ant's autodiscovery. Place <code>dotnet.jar</code> | |||||
| into a directory and use <code>ant -lib | |||||
| DIR-CONTAINING-THE-JAR</code> or copy it into | |||||
| <code>ANT_HOME/lib</code> - and then in your build file, simply | |||||
| declare the namespace on the <code>project</code> tag: | |||||
| <pre> | |||||
| <project | |||||
| xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" | |||||
| xmlns="antlib:org.apache.tools.ant"> | |||||
| </pre> | |||||
| And all tasks of this library will automatically be available | |||||
| in the <code>dn</code> namespace without any | |||||
| <code>taskdef</code>. | |||||
| </li> | |||||
| </ul> | |||||
| <h2>Tasks</h2> | |||||
| <ul> | |||||
| <li><a href="dotnetexec.html">dotnetexec</a> - run a .NET | |||||
| assembly that's in your PATH. You can chose the framework that | |||||
| is going to be used - defaults to Mono on non-Windows platforms | |||||
| and Microsoft's on Windows.</li> | |||||
| <li><a href="nant.html">nant</a> - execute the NAnt build | |||||
| tool.</li> | |||||
| <li><a href="msbuild.html">msbuild</a> - execute the MSBuild build | |||||
| tool, untested.</li> | |||||
| </ul> | |||||
| <hr/> | |||||
| <p align="center">Copyright © 2003 Apache Software Foundation. All rights Reserved.</p> | |||||
| </body> | |||||
| </html> | |||||
| @@ -0,0 +1,110 @@ | |||||
| <html> | |||||
| <head> | |||||
| <meta http-equiv="Content-Language" content="en-us"></meta> | |||||
| <title>MSBuild Task</title> | |||||
| </head> | |||||
| <body> | |||||
| <h2><a name="dotnetexec">MSBuild</a></h2> | |||||
| <h3>Description</h3> | |||||
| <p>Runs the MSBuild build tool presented at the 2003 PDC. This | |||||
| task is completely untested as the developers have no access to | |||||
| the tool, it has been implemented by looking at the docs only.</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, | |||||
| MSBuild's default build file search algorithm will apply. Nesting | |||||
| build file snippets is most probably not working correctly.</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 MSBuild 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> | |||||
| </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 MSBuild invocation.</p> | |||||
| <h4>build</h4> | |||||
| <p>This element allows no attributes. You can nest a MSBuild build | |||||
| file into it and MSBuild will be executed on that. You can also nest | |||||
| a build file snippet instead and Ant will wrap the necessary MSBuild | |||||
| <code><Project> around it.</code></p> | |||||
| <h3>Examples</h3> | |||||
| <p>Let MSBuild search for a *.proj file in the (Ant) project's base | |||||
| directory and execute the default target in it:</p> | |||||
| <pre><msbuild/></pre> | |||||
| <p>Let MSBuild execute the targets named foo and bar in the build | |||||
| file msbuild.proj in Ant's basedir and pass the property | |||||
| <code>/property:test=testvalue</code> to it:</p> | |||||
| <pre> | |||||
| <msbuild buildfile="msbuild.proj"> | |||||
| <target name="foo"/> | |||||
| <target name="bar"/> | |||||
| <property name="test" value="testvalue"/> | |||||
| </msbuild> | |||||
| </pre> | |||||
| <p>Define a build file embeded into the task, let MSBuild execute the | |||||
| echo target of that build file.</p> | |||||
| <pre> | |||||
| <msbuild> | |||||
| <target name="echo"> | |||||
| <build> | |||||
| <Project DefaultTargets="empty"> | |||||
| <Target Name="empty"/> | |||||
| <Target Name="echo"> | |||||
| <Task Name="Echo" Message="This is MSBuild"/> | |||||
| </Target> | |||||
| </Project> | |||||
| </build> | |||||
| </msbuild> | |||||
| </pre> | |||||
| <p>Run MSBuild's Echo task (if there actually is one):</p> | |||||
| <pre> | |||||
| <msbuild> | |||||
| <build> | |||||
| <Task Name="Echo" Message="This is MSBuild"/> | |||||
| </build> | |||||
| </msbuild> | |||||
| </pre> | |||||
| <hr/> | |||||
| <p align="center">Copyright © 2003 Apache Software Foundation. All rights Reserved.</p> | |||||
| </body> | |||||
| </html> | |||||
| @@ -0,0 +1,108 @@ | |||||
| <html> | |||||
| <head> | |||||
| <meta http-equiv="Content-Language" content="en-us"></meta> | |||||
| <title>NAnt Task</title> | |||||
| </head> | |||||
| <body> | |||||
| <h2><a name="dotnetexec">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> | |||||
| </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> | |||||
| <hr/> | |||||
| <p align="center">Copyright © 2003 Apache Software Foundation. All rights Reserved.</p> | |||||
| </body> | |||||
| </html> | |||||