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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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> from within Ant.</p>
  12. <h2>Requirements</h2>
  13. <p>The current version will only work for a CVS build of Ant
  14. created from CVS HEAD (i.e. after Ant 1.6's feature freeze) of
  15. 2003-11-27 or later. A version that can work with Ant 1.6 may be
  16. provided at a later stage. This task library is never going to
  17. work with Ant &lt; 1.6.</p>
  18. <h2>Installation</h2>
  19. <p>If you are building this from sources, run the antlib target
  20. and you'll get a file <code>dotnet.jar</code>. If you've
  21. downloaded <code>dotnet.jar</code>, you are already ready.</p>
  22. <p>There are several ways to use the tasks:</p>
  23. <ul>
  24. <li>The traditional way:
  25. <pre>
  26. &lt;taskdef
  27. resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"&gt;
  28. &lt;classpath&gt;
  29. &lt;pathelement location="YOUR-PATH-TO/dotnet.jar"/&gt;
  30. &lt;/classpath&gt;
  31. &lt;/taskdef&gt;
  32. </pre>
  33. With this you can use the tasks like plain Ant tasks, they'll
  34. live in the default namespace. I.e. if you can run
  35. &lt;exec&gt; without any namespace prefix, you can do so for
  36. &lt;dotnetexec&gt; as well.
  37. </li>
  38. <li>Similar, but assigning a namespace URI
  39. <pre>
  40. &lt;taskdef
  41. uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
  42. resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"&gt;
  43. &lt;classpath&gt;
  44. &lt;pathelement location="YOUR-PATH-TO/dotnet.jar"/&gt;
  45. &lt;/classpath&gt;
  46. &lt;/taskdef&gt;
  47. </pre>
  48. This puts you task into a separate namespace than Ant's
  49. namespace. You would use the tasks like
  50. <pre>
  51. &lt;project
  52. xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
  53. xmlns="antlib:org.apache.tools.ant"&gt;
  54. ...
  55. &lt;dn:nant&gt;
  56. &lt;dn:target name="my-target"/&gt;
  57. &lt;/dn:nant&gt;
  58. </pre>
  59. or
  60. <pre>
  61. &lt;nant xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"&gt;
  62. &lt;target name="my-target"/&gt;
  63. &lt;/nant&gt;
  64. </pre>
  65. or a variation thereof.
  66. </li>
  67. <li>Using Ant's autodiscovery. Place <code>dotnet.jar</code>
  68. into a directory and use <code>ant -lib
  69. DIR-CONTAINING-THE-JAR</code> or copy it into
  70. <code>ANT_HOME/lib</code> - and then in your build file, simply
  71. declare the namespace on the <code>project</code> tag:
  72. <pre>
  73. &lt;project
  74. xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
  75. xmlns="antlib:org.apache.tools.ant"&gt;
  76. </pre>
  77. And all tasks of this library will automatically be available
  78. in the <code>dn</code> namespace without any
  79. <code>taskdef</code>.
  80. </li>
  81. </ul>
  82. <h2>Tasks</h2>
  83. <ul>
  84. <li><a href="dotnetexec.html">dotnetexec</a> - run a .NET
  85. assembly that's in your PATH. You can chose the framework that
  86. is going to be used - defaults to Mono on non-Windows platforms
  87. and Microsoft's on Windows.</li>
  88. <li><a href="nant.html">nant</a> - execute the NAnt build
  89. tool.</li>
  90. <li><a href="msbuild.html">msbuild</a> - execute the MSBuild build
  91. tool, untested.</li>
  92. </ul>
  93. <hr/>
  94. <p align="center">Copyright &copy; 2003 Apache Software Foundation. All rights Reserved.</p>
  95. </body>
  96. </html>