diff options
author | mattinger <[email protected]> | 2006-07-06 21:53:00 +0000 |
---|---|---|
committer | mattinger <[email protected]> | 2006-07-06 21:53:00 +0000 |
commit | 1159111b7a71b72eb04326df33211e1733f7e742 (patch) | |
tree | f0a80c384f633e521649654ab78e6239cf5e0d6f /docs/manual/tasks/antfetch_task.html |
Initial addition into subversion with build script changes
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/trunk/ant-contrib@5 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'docs/manual/tasks/antfetch_task.html')
-rw-r--r-- | docs/manual/tasks/antfetch_task.html | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/docs/manual/tasks/antfetch_task.html b/docs/manual/tasks/antfetch_task.html new file mode 100644 index 0000000..f92e635 --- /dev/null +++ b/docs/manual/tasks/antfetch_task.html @@ -0,0 +1,151 @@ +<html> +<head> +<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title> +AntFetch</title> +<meta content="DocBook XSL Stylesheets V1.60.1" name="generator"> +<link rel="home" href="index.html" title="Antelope Users Guide"> +<link rel="up" href="bk03.html" title="Additional Ant Tasks"> +<link rel="previous" href="bk03ch13.html" title="Chapter 13. SSH and SCP"> +<link rel="next" href="bk03ch15.html" title="Chapter 15. AntCallBack"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<div class="chapter" lang="en"> +<div class="titlepage"> +<div> +<div> +<h2 class="title"> +<a name="antfetch"> +</a> +AntFetch</h2> +</div> +</div> +<div> +</div> +</div> +<p> + +AntFetch is identical to the standard 'Ant' task, except that it allows properties from the new project to be set in the original project. +</p> +<p> + +</p> +<p> + +Some background may be in order: When the <ant> task is used, in actuality, a new Ant project is created, and depending on the inheritAll property, it is populated with properties from the original project. Then the target in this new project is executed. Any properties set in the new project remain with that project, they do not get "passed back" to the original project. So, for example, if the target in the new project sets a property named "image.directory", there is no reference to that property in the original. Here's an example of what I mean: +</p> +<p> + +Suppose that the "fillImageDirectory" target sets a property named "image.directory" and I call the following: +<table border="0" bgcolor="#E0E0E0"> +<tr> +<td> +<pre class="programlisting"> + + + <ant dir="${image.project} target="fillImageDirectory"/> + <echo>${image.directory}</echo> + +</pre> +</td> +</tr> +</table> + +The output of the echo task will be ${image.directory}, not whatever was set in the "fillImageDirectory" target. +</p> +<p> + +The AntFetch task allows that image.directory property to be set in the original project. The attributes for AntFetch are identical to the 'Ant' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names. +</p> +<p> + +Assuming that "fillImageDirectory" actually sets a property named "image.directory", the following example will print out the directory name: +<table border="0" bgcolor="#E0E0E0"> +<tr> +<td> +<pre class="programlisting"> + + + <antfetch dir="${image.project} target="fillImageDirectory" return="image.directory"/> + <echo>${image.directory}</echo> + +</pre> +</td> +</tr> +</table> + +</p> +<p> + +And this one will also print out the thumbnail directory: +<table border="0" bgcolor="#E0E0E0"> +<tr> +<td> +<pre class="programlisting"> + + + <antfetch dir="${image.project} target="fillImageDirectory" return="image.directory, thumbnail.directory"/> + <echo>${image.directory}</echo> + <echo>${thumbnail.directory}</echo> + +</pre> +</td> +</tr> +</table> + +</p> +<p> + +The attributes for AntFetch are identical to the 'ant' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names. +<div class="table"> +<a name="N10B35"> +</a> +<p class="title"> +<b> +Table 14.1. AntFetch Attributes</b> +</p> +<table summary="AntFetch 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> +return</td> +<td> +A comma separated list of property names. Whitespace is allowed, so either "a,b" or "a, b" are acceptable.</td> +<td> +None</td> +<td> +No</td> +</tr> +</tbody> +</table> +</div> + +</p> +<p> + +For other attribute and nested element information and more examples, see the documentation for the "ant" task in the Ant documentation. +</p> +</div> + <hr> + <p align="center">Copyright © 2003 Ant-Contrib Project. All + rights Reserved.</p> +</body> +</html> |