You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 15 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <html lang="en">
  17. <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
  18. <head>
  19. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  20. <title>Apache Ant - Apache .NET Ant Library</title>
  21. <link type="text/css" href="../../page.css" rel="stylesheet">
  22. </head>
  23. <body>
  24. <p class="navpath">
  25. <script src="../../breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
  26. </p>
  27. <div class="logobar">
  28. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  29. <tr>
  30. <td align="left"><img border="0" alt="Apache Ant site" src="../../images/group-logo.gif"></td>
  31. <td align="center" width="100%"><img alt="Apache Ant logo" border="0" src="../../images/project-logo.gif"></td>
  32. <td align="right">
  33. <form target="_blank" onsubmit="q.value = query.value + ' site:ant.apache.org'" action="http://www.google.com/search" method="get">
  34. <table summary="search" border="0" cellspacing="0" cellpadding="0" bgcolor="#4C6C8F">
  35. <tr>
  36. <td colspan="3"><img height="10" width="1" alt="" src="../../images/spacer.gif"></td>
  37. </tr>
  38. <tr>
  39. <td><img height="1" width="1" alt="" src="../../images/spacer.gif"></td>
  40. <td nowrap="nowrap" class="searchcaption">
  41. <input name="q" type="hidden">
  42. <input size="15" id="query" type="text">
  43. <img height="1" width="5" alt="" src="../../images/spacer.gif">
  44. <input name="Search" value="Search" type="submit">
  45. <br>
  46. the Apache Ant site
  47. </td>
  48. <td><img height="1" width="1" alt="" src="../../images/spacer.gif"></td>
  49. </tr>
  50. <tr>
  51. <td><img alt="" border="0" height="10" width="9" src="../../images/search-left.gif"></td>
  52. <td><img height="1" width="1" alt="" src="../../images/spacer.gif"></td>
  53. <td><img alt="" border="0" height="10" width="9" src="../../images/search-right.gif"></td>
  54. </tr>
  55. </table>
  56. </form>
  57. </td>
  58. </tr>
  59. </table>
  60. </div>
  61. <div class="tab">
  62. <table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
  63. <tr>
  64. <td width="5"><img alt="" height="8" width="8" src="../../images/spacer.gif"></td><td valign="bottom">
  65. <table summary="non selected tab" style="height: 1.4em" border="0" cellpadding="0" cellspacing="0">
  66. <tr>
  67. <td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="../../images/tab-left.gif"></td><td valign="middle" bgcolor="#B2C4E0"><a href="../../index.html"><font size="2" face="Arial, Helvetica, Sans-serif">Home</font></a></td><td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="../../images/tab-right.gif"></td>
  68. </tr>
  69. </table>
  70. </td>
  71. <td width="8"><img alt="" height="5" width="8" src="../../images/spacer.gif"></td><td valign="bottom">
  72. <table summary="selected tab" style="height: 1.5em" border="0" cellpadding="0" cellspacing="0">
  73. <tr>
  74. <td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="../../images/tabSel-left.gif"></td><td valign="middle" bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, Sans-serif"><b>Projects</b></font></td><td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="../../images/tabSel-right.gif"></td>
  75. </tr>
  76. </table>
  77. </td>
  78. </tr>
  79. </table>
  80. </div>
  81. <div class="bluebar"></div>
  82. <div class="menucontainer">
  83. <div class="menu">
  84. <ul>
  85. <li class="menuheader">Projects
  86. <ul>
  87. <li>
  88. <a href="../../projects/index.html">Welcome</a>
  89. </li>
  90. </ul>
  91. </li>
  92. <li class="menuheader">Apache Ant Libraries
  93. <ul>
  94. <li>
  95. <a href="../../antlibs/index.html">Introduction</a>
  96. </li>
  97. <li>
  98. <a href="../../antlibs/charter.html">Charter</a>
  99. </li>
  100. <li>
  101. <a href="../../antlibs/proper.html">Ant Libraries</a>
  102. </li>
  103. <li>
  104. <a href="../../antlibs/sandbox.html">Sandbox Ant Libraries</a>
  105. </li>
  106. <li>
  107. <a href="http://ant.apache.org/antlibs/bindownload.cgi">Binary Distributions</a>
  108. </li>
  109. <li>
  110. <a href="http://ant.apache.org/antlibs/srcdownload.cgi">Source Distributions</a>
  111. </li>
  112. </ul>
  113. </li>
  114. <li class="menuheader">Apache Ivy
  115. <ul>
  116. <li>
  117. <a href="../../projects/ivy.html">Introduction</a>
  118. </li>
  119. <li>
  120. <a href="http://ant.apache.org/ivy/">Homepage</a>
  121. </li>
  122. <li>
  123. <a href="http://ant.apache.org/ivy/download.cgi">Distributions</a>
  124. </li>
  125. <li>
  126. <a href="http://cwiki.apache.org/IVY/">Wiki</a>
  127. </li>
  128. </ul>
  129. </li>
  130. <li class="menuheader">Apache IvyDE
  131. <ul>
  132. <li>
  133. <a href="../../projects/ivyde.html">Introduction</a>
  134. </li>
  135. <li>
  136. <a href="http://ant.apache.org/ivy/ivyde">Homepage</a>
  137. </li>
  138. <li>
  139. <a href="http://ant.apache.org/ivy/ivyde/screenshots.html">Screenshots</a>
  140. </li>
  141. <li>
  142. <a href="http://ant.apache.org/ivy/ivyde/download.cgi">Distributions</a>
  143. </li>
  144. </ul>
  145. </li>
  146. </ul>
  147. </div>
  148. <center>
  149. <a href="http://www.apache.org/events/current-event.html"><img border="0" title="ApacheCon" alt="ApacheCon - logo" src="http://www.apache.org/events/current-event-125x125.png" style="width: 125px;height: 125px;"></a>
  150. </center>
  151. <img style="float: left" height="10" width="10" border="0" alt="" src="../../images/menu-left.gif">
  152. <img style="float: right" height="10" width="10" border="0" alt="" src="../../images/menu-right.gif">
  153. </div>
  154. <div class="lightbluebar">&nbsp;</div>
  155. <div class="main">
  156. <div class="content">
  157. <h1 class="title">Apache .NET Ant Library</h1>
  158. <h3 class="section">
  159. <a name="Apache .NET Ant Library&amp;#x2122;"></a>
  160. Apache .NET Ant Library&#x2122;
  161. </h3>
  162. <p>The Apache .NET Antlib provides tasks that support
  163. development of .NET software with Apache Ant.</p>
  164. <h3 class="section">
  165. <a name="Apache .NET Ant Library 1.0"></a>
  166. Apache .NET Ant Library 1.0
  167. </h3>
  168. <h3>November 6, 2006 - Apache .NET Ant Library 1.0
  169. Available</h3>
  170. <p>Apache .NET Ant Library 1.0 is now available for
  171. download as <a href="http://ant.apache.org/antlibs/bindownload.cgi">binary</a>
  172. or <a href="http://ant.apache.org/antlibs/srcdownload.cgi">source</a>
  173. release.</p>
  174. <h3 class="section">
  175. <a name="Idea"></a>
  176. Idea
  177. </h3>
  178. <p>This library doesn't strive to replace NAnt or MSBuild, its
  179. main purpose is to help those of us who work on projects
  180. crossing platform boundaries. With this library you can use Ant
  181. to build and test the Java as well as the .NET parts of your
  182. project.</p>
  183. <p>This library provides a special version of the
  184. <code>&lt;exec&gt;</code> task tailored to run .NET executables.
  185. On Windows it will assume the Microsoft framework is around and
  186. run the executable directly, while it will invoke Mono on any
  187. other platform. Of course you can override these
  188. assumptions.</p>
  189. <p>Based on this a few tasks to run well known .NET utilities
  190. from within Ant are provided, namely tasks to run <a href="http://www.nunit.org/">NUnit</a>, <a href="http://nant.sf.net/">NAnt</a>, <a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=27&amp;SiteID=1">MSBuild</a>
  191. and the <a href="http://wix.sf.net/">Wix</a> toolkit.</p>
  192. <p>The initial .NET tasks of Ant (compiler tasks for C#, J# and VB.NET
  193. for example) have also been moved to this Antlib and will see further
  194. development here.</p>
  195. <h3 class="section">
  196. <a name="Tasks"></a>
  197. Tasks
  198. </h3>
  199. <h4 class="subsection">
  200. <a name="dotnetexec"></a>
  201. dotnetexec
  202. </h4>
  203. <p>Runs a .NET executable.</p>
  204. <h4 class="subsection">
  205. <a name="nunit"></a>
  206. nunit
  207. </h4>
  208. <p>Runs NUnit tests.</p>
  209. <h4 class="subsection">
  210. <a name="nant"></a>
  211. nant
  212. </h4>
  213. <p>Invokes NAnt, either on an external file or a build file
  214. snippet contained inside your Ant build file.</p>
  215. <h4 class="subsection">
  216. <a name="msbuild"></a>
  217. msbuild
  218. </h4>
  219. <p>Invokes MSBuild, either on an external file or a build file
  220. snippet contained inside your Ant build file.</p>
  221. <h4 class="subsection">
  222. <a name="wix"></a>
  223. wix
  224. </h4>
  225. <p>Invokes the candle and light executables of the WiX toolkit
  226. in order to create MSI installers from within Ant.</p>
  227. <h3 class="section">
  228. <a name="Examples"></a>
  229. Examples
  230. </h3>
  231. <h4 class="subsection">
  232. <a name="nant"></a>
  233. nant
  234. </h4>
  235. <pre class="code">
  236. &lt;project xmlns:dn=&quot;antlib:org.apache.ant.dotnet&quot;&gt;
  237. &lt;dn:nant&gt;
  238. &lt;build&gt;
  239. &lt;echo message=&quot;Hello world&quot;/&gt;
  240. &lt;/build&gt;
  241. &lt;/dn:nant&gt;
  242. &lt;/project&gt;
  243. </pre>
  244. <p>runs NAnt on the embedded <code>&lt;echo&gt;</code>
  245. task, output looks like</p>
  246. <pre class="code">
  247. Buildfile: test.xml
  248. [dn:nant] NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005)
  249. [dn:nant] Copyright (C) 2001-2005 Gerry Shaw
  250. [dn:nant] http://nant.sourceforge.net
  251. [dn:nant]
  252. [dn:nant] Buildfile: file:///c:/DOKUME~1/STEFAN~1.BOD/LOKALE~1/Temp/build1058451555.xml
  253. [dn:nant] Target framework: Microsoft .NET Framework 1.1
  254. [dn:nant]
  255. [dn:nant] [echo] Hello world
  256. [dn:nant]
  257. [dn:nant] BUILD SUCCEEDED
  258. [dn:nant]
  259. [dn:nant] Total time: 0.2 seconds.
  260. BUILD SUCCESSFUL
  261. Total time: 2 seconds</pre>
  262. <h4 class="subsection">
  263. <a name="msbuild"></a>
  264. msbuild
  265. </h4>
  266. <pre class="code">
  267. &lt;project xmlns:dn=&quot;antlib:org.apache.ant.dotnet&quot;&gt;
  268. &lt;dn:msbuild&gt;
  269. &lt;build&gt;
  270. &lt;Message Text=&quot;Hello world&quot;
  271. xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;/&gt;
  272. &lt;/build&gt;
  273. &lt;/dn:msbuild&gt;
  274. &lt;/project&gt;</pre>
  275. <p>runs MSBuild on the embedded <code>&lt;Message&gt;</code>
  276. task, output looks like</p>
  277. <pre class="code">
  278. Buildfile: test.xml
  279. [dn:msbuild] Microsoft (R) Build Engine Version 2.0.50727.42
  280. [dn:msbuild] [Microsoft .NET Framework, Version 2.0.50727.42]
  281. [dn:msbuild] Copyright (C) Microsoft Corporation 2005. All rights reserved.
  282. [dn:msbuild] Build started 15.12.2005 20:21:56.
  283. [dn:msbuild] __________________________________________________
  284. [dn:msbuild] Project &quot;c:\Dokumente und Einstellungen\stefan.bodewig\Lokale Einstellungen\Temp\build1543310185.xml&quot; (default targets):
  285. [dn:msbuild] Target generated-by-ant:
  286. [dn:msbuild] Hello world
  287. [dn:msbuild] Build succeeded.
  288. [dn:msbuild] 0 Warning(s)
  289. [dn:msbuild] 0 Error(s)
  290. [dn:msbuild] Time Elapsed 00:00:00.10
  291. BUILD SUCCESSFUL
  292. Total time: 0 seconds
  293. </pre>
  294. </div>
  295. </div>
  296. <p class="copyright">
  297. Apache Ant, Apache Ivy, Ant, Ivy, Apache, the Apache feather logo, and the Apache Ant project logos are trademarks of The Apache Software Foundation.
  298. <script type="text/javascript" language="JavaScript"><!--
  299. document.write(" - "+"Last Published: " + document.lastModified);
  300. // -->
  301. </script>
  302. </p>
  303. </body>
  304. </html>