1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 21. Call Task</title><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="Antelope Users Guide"><link rel="up" href="bk03.html" title="Additional Ant Tasks"><link rel="prev" href="bk03ch20.html" title="Chapter 20. AntCallBack"><link rel="next" href="bk03ch22.html" title="Chapter 22. Grep Task"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 21. Call Task</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk03ch20.html">Prev</a> </td><th width="60%" align="center">Additional Ant Tasks</th><td width="20%" align="right"> <a accesskey="n" href="bk03ch22.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="calltask"></a>Chapter 21. Call Task</h2></div></div></div>
|
---|
2 | <STYLE TYPE="text/css"> <!-- @import url(./style.css); --> </STYLE>
|
---|
3 | <p>
|
---|
4 | This is the simplest and possibly the most obvious of the "call" type of tasks. It simply calls a target in the current build file and provides exactly the functionality expected by many users of "antcall".
|
---|
5 | </p><p>
|
---|
6 | To use this task in your build files, include a task definition like this:
|
---|
7 | </p><pre class="programlisting">
|
---|
8 |
|
---|
9 | <taskdef name="call" classname="ise.antelope.tasks.Call"/>
|
---|
10 |
|
---|
11 | </pre><p>
|
---|
12 | </p><p>
|
---|
13 | There is only one attribute, that is the name of the target to call.
|
---|
14 |
|
---|
15 | </p><div class="table"><a name="id2524808"></a><p class="title"><b>Table 21.1. Call Task Attributes</b></p><table summary="Call Task Attributes" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td>target</td><td>The name of a target to execute.</td><td>None</td><td>Yes</td></tr></tbody></table></div><p>
|
---|
16 | </p><p>
|
---|
17 | There is none of the weird property manipulation done by "ant", "antcall", "antfetch", or "antcallback", and none of the overhead. When you call a target, any properties set in that target are immediately available in the calling target. A simple example should be all that is necessary:
|
---|
18 | </p><pre class="programlisting">
|
---|
19 |
|
---|
20 | <target name="test" description="Test Call">
|
---|
21 | <call target="called"/>
|
---|
22 | <echo>a = ${a}</echo>
|
---|
23 | <echo>b = ${b}</echo>
|
---|
24 | </target>
|
---|
25 |
|
---|
26 | <target name="called">
|
---|
27 | <property name="a" value="A"/>
|
---|
28 | <property name="b" value="B"/>
|
---|
29 | </target>
|
---|
30 |
|
---|
31 | </pre><p>
|
---|
32 | </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk03ch20.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk03ch22.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 20. AntCallBack </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 22. Grep Task</td></tr></table></div></body></html>
|
---|