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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us"></meta>
  4. <title>Dotnet Ant Library</title>
  5. </head>
  6. <body>
  7. <h2>Introduction</h2>
  8. <p>This is a library of Ant tasks that support using .NET
  9. executables accross different platforms and in particular support
  10. using common .NET development tools like <a
  11. href="http://nant.sourceforge.net/">NAnt</a> or <a
  12. href="http://www.nunit.org/">NUnit</a> from within Ant.</p>
  13. <h2>Requirements</h2>
  14. <p>The current version requires Ant 1.6.2 or later and may even
  15. work better for a CVS build of Ant created from CVS HEAD.</p>
  16. <h2>Installation</h2>
  17. <p>If you are building this from sources, run the antlib target
  18. and you'll get a file <code>dotnet.jar</code>. If you've
  19. downloaded <code>dotnet.jar</code>, you are already ready.</p>
  20. <p>There are several ways to use the tasks:</p>
  21. <ul>
  22. <li>The traditional way:
  23. <pre>
  24. &lt;taskdef
  25. resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"&gt;
  26. &lt;classpath&gt;
  27. &lt;pathelement location="YOUR-PATH-TO/dotnet.jar"/&gt;
  28. &lt;/classpath&gt;
  29. &lt;/taskdef&gt;
  30. </pre>
  31. With this you can use the tasks like plain Ant tasks, they'll
  32. live in the default namespace. I.e. if you can run
  33. &lt;exec&gt; without any namespace prefix, you can do so for
  34. &lt;dotnetexec&gt; as well.
  35. </li>
  36. <li>Similar, but assigning a namespace URI
  37. <pre>
  38. &lt;taskdef
  39. uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
  40. resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"&gt;
  41. &lt;classpath&gt;
  42. &lt;pathelement location="YOUR-PATH-TO/dotnet.jar"/&gt;
  43. &lt;/classpath&gt;
  44. &lt;/taskdef&gt;
  45. </pre>
  46. This puts you task into a separate namespace than Ant's
  47. namespace. You would use the tasks like
  48. <pre>
  49. &lt;project
  50. xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
  51. xmlns="antlib:org.apache.tools.ant"&gt;
  52. ...
  53. &lt;dn:nant&gt;
  54. &lt;dn:target name="my-target"/&gt;
  55. &lt;/dn:nant&gt;
  56. </pre>
  57. or
  58. <pre>
  59. &lt;nant xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"&gt;
  60. &lt;target name="my-target"/&gt;
  61. &lt;/nant&gt;
  62. </pre>
  63. or a variation thereof.
  64. </li>
  65. <li>Using Ant's autodiscovery. Place <code>dotnet.jar</code>
  66. into a directory and use <code>ant -lib
  67. DIR-CONTAINING-THE-JAR</code> or copy it into
  68. <code>ANT_HOME/lib</code> - and then in your build file, simply
  69. declare the namespace on the <code>project</code> tag:
  70. <pre>
  71. &lt;project
  72. xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
  73. xmlns="antlib:org.apache.tools.ant"&gt;
  74. </pre>
  75. And all tasks of this library will automatically be available
  76. in the <code>dn</code> namespace without any
  77. <code>taskdef</code>.
  78. </li>
  79. </ul>
  80. <h2>Tasks</h2>
  81. <ul>
  82. <li><a href="dotnetexec.html">dotnetexec</a> - run a .NET
  83. assembly that's in your PATH. You can chose the framework that
  84. is going to be used - defaults to Mono on non-Windows platforms
  85. and Microsoft's on Windows.</li>
  86. <li><a href="nant.html">nant</a> - execute the NAnt build
  87. tool.</li>
  88. <li><a href="msbuild.html">msbuild</a> - execute the MSBuild build
  89. tool, untested.</li>
  90. <li><a href="wix.html">wix</a> - execute the WiX toolset, untested.</li>
  91. <li><a href="nunit.html">nunit</a> - execute the
  92. nunit-console.exe <a href="http://www.nunit.org/">NUnit</a>
  93. test runner.</li>
  94. </ul>
  95. <hr/>
  96. <p align="center">Copyright &copy; 2003-2004 The Apache Software Foundation. All rights Reserved.</p>
  97. </body>
  98. </html>