1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
5 | <title>BuildNumber Task</title>
|
---|
6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
7 | </head>
|
---|
8 |
|
---|
9 | <body>
|
---|
10 |
|
---|
11 | <h2><a name="buildnumber">BuildNumber</a></h2>
|
---|
12 | <h3>Description</h3>
|
---|
13 | <p>This is a basic task that can be used to track build numbers.</p>
|
---|
14 | <p>It will first attempt to read a build number from a file (by default,
|
---|
15 | <code>build.number</code> in the current directory), then
|
---|
16 | set the property <code>build.number</code> to the value that was read in
|
---|
17 | (or to <code>0</code>, if no such value). It will then increment the
|
---|
18 | number by one and write it back out to the file.
|
---|
19 | (See the
|
---|
20 | <a href="../OptionalTasks/propertyfile.html">PropertyFile</a> task
|
---|
21 | if you need finer control over things such as the property name or
|
---|
22 | the number format.)
|
---|
23 | </p>
|
---|
24 |
|
---|
25 | <h3>Parameters</h3>
|
---|
26 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
27 | <tr>
|
---|
28 | <td valign="top"><b>Attribute</b></td>
|
---|
29 | <td valign="top"><b>Description</b></td>
|
---|
30 | <td align="center" valign="top"><b>Required</b></td>
|
---|
31 | </tr>
|
---|
32 | <tr>
|
---|
33 | <td valign="top">file</td>
|
---|
34 | <td valign="top">The file to read and write the build number from/to.</td>
|
---|
35 | <td align="center" valign="top">No; defaults to "build.number"</td>
|
---|
36 | </tr>
|
---|
37 | </table>
|
---|
38 |
|
---|
39 | <h3>Examples</h3>
|
---|
40 | <blockquote><pre>
|
---|
41 | <buildnumber/>
|
---|
42 | </pre></blockquote>
|
---|
43 |
|
---|
44 | <p>Read, increment, and write a build number to the default file,
|
---|
45 | <code>build.number</code>.</p>
|
---|
46 |
|
---|
47 | <blockquote><pre>
|
---|
48 | <buildnumber file="mybuild.number"/>
|
---|
49 | </pre></blockquote>
|
---|
50 |
|
---|
51 | <p>Read, increment, and write a build number to the file
|
---|
52 | <code>mybuild.number</code>.</p>
|
---|
53 |
|
---|
54 | <hr><p align="center">Copyright © 2002,2004-2005 The Apache Software Foundation.
|
---|
55 | All rights Reserved.</p>
|
---|
56 |
|
---|
57 | </body>
|
---|
58 | </html>
|
---|
59 |
|
---|