You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jh...@apache.org on 2006/10/19 10:53:56 UTC
svn commit: r465533 - in /ant/core/trunk/docs/manual: using.html
usinglist.html
Author: jhm
Date: Thu Oct 19 01:53:55 2006
New Revision: 465533
URL: http://svn.apache.org/viewvc?view=rev&rev=465533
Log:
Add a paragraph about using external task libraries.
Modified:
ant/core/trunk/docs/manual/using.html
ant/core/trunk/docs/manual/usinglist.html
Modified: ant/core/trunk/docs/manual/using.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/using.html?view=diff&rev=465533&r1=465532&r2=465533
==============================================================================
--- ant/core/trunk/docs/manual/using.html (original)
+++ ant/core/trunk/docs/manual/using.html Thu Oct 19 01:53:55 2006
@@ -611,19 +611,73 @@
</target>
</project>
</pre></blockquote>
-<p>All tasks that use nested elements for
-<a href="CoreTypes/patternset.html">PatternSet</a>s,
-<a href="CoreTypes/fileset.html">FileSet</a>s,
-<a href="CoreTypes/zipfileset.html">ZipFileSet</a>s or
-<a href="#path">path-like structures</a> accept references to these structures
-as shown in the examples. Using <code>refid</code> on a task will ordinarily
-have the same effect (referencing a task already declared), but the user
-should be aware that the interpretation of this attribute is dependent on the
-implementation of the element upon which it is specified. Some tasks (the
-<a href="CoreTasks/property.html">property</a> task is a handy example)
+<p>All tasks that use nested elements for
+<a href="CoreTypes/patternset.html">PatternSet</a>s,
+<a href="CoreTypes/fileset.html">FileSet</a>s,
+<a href="CoreTypes/zipfileset.html">ZipFileSet</a>s or
+<a href="#path">path-like structures</a> accept references to these structures
+as shown in the examples. Using <code>refid</code> on a task will ordinarily
+have the same effect (referencing a task already declared), but the user
+should be aware that the interpretation of this attribute is dependent on the
+implementation of the element upon which it is specified. Some tasks (the
+<a href="CoreTasks/property.html">property</a> task is a handy example)
deliberately assign a different meaning to <code>refid</code>.</p>
+<h3><a name="external-tasks">Use of external tasks</a></h3>
+Ant supports a plugin mechanism for using third party tasks. For using them you
+have to do two steps:
+<ol>
+ <li>place their implementation somewhere where Ant can find them</li>
+ <li>declare them.</li>
+</ol>
+Don't add anything to the CLASSPATH environment variable - this is often the
+reason for very obscure errors. Use Ant's own <a href="install.html#optionalTasks">mechanisms</a>
+for adding libraries:
+<ul>
+ <li>via command line argument <code>-lib</code></li>
+ <li>adding to <code>${user.home}/.ant/lib</code></li>
+ <li>adding to <code>${ant.home}/lib</code></li>
+</ul>
+For the declaration there are several ways:
+<ul>
+ <li>declare a single task per using instruction using
+ <code><<a href="CoreTasks/taskdef.html">taskdef</a> name="taskname"
+ classname="ImplementationClass"/></code>
+ <br>
+ <code><taskdef name="for" classname="net.sf.antcontrib.logic.For" />
+ <for ... /></code>
+ </li>
+ <li>declare a bundle of tasks using a properties-file holding these
+ taskname-ImplementationClass-pairs and <code><taskdef></code>
+ <br>
+ <code><taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+ <for ... /></code>
+ </li>
+ <li>declare a bundle of tasks using a <a href="CoreTypes/antlib.html">xml-file</a> holding these
+ taskname-ImplementationClass-pairs and <code><taskdef></code>
+ <br>
+ <code><taskdef resource="net/sf/antcontrib/antlib.xml" />
+ <for ... /></code>
+ </li>
+ <li>declare a bundle of tasks using a xml-file named antlib.xml, XML-namespace and
+ <a href="CoreTypes/antlib.html#antlibnamespace"><code>antlib:</code> protocoll handler</a>
+ <br>
+ <code><project xmlns:ac="antlib:net.sf.antconrib"/>
+ <ac:for ... /></code>
+ </li>
+</ul>
+
+If you need a special function, you should
+<ol>
+ <li>have a look at this manual, because Ant provides lot of tasks</li>
+ <li>have a look at the external task page in the <a href="../external.html">manual</a>
+ (or better <a href="http://ant.apache.org/external.html">online</a>)</li>
+ <li>have a look at the external task <a href="http://wiki.apache.org/ant/AntExternalTaskdefs">wiki
+ page</a></li>
+ <li>ask on the <a href="http://ant.apache.org/mail.html#User%20List">Ant user</a> list</li>
+ <li><a href="tutorial-writing-tasks.html">implement </a>(and share) your own</li>
+</ol>
</body>
-</html>
+</html>
\ No newline at end of file
Modified: ant/core/trunk/docs/manual/usinglist.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/usinglist.html?view=diff&rev=465533&r1=465532&r2=465533
==============================================================================
--- ant/core/trunk/docs/manual/usinglist.html (original)
+++ ant/core/trunk/docs/manual/usinglist.html Thu Oct 19 01:53:55 2006
@@ -39,6 +39,7 @@
<a href="using.html#path">Path-like Structures</a><br>
<a href="using.html#arg">Command-line Arguments</a><br>
<a href="using.html#references">References</a><br>
+ <a href="using.html#external-tasks">Use of external tasks</a><br>
</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org