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.9 KiB

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