org.apache.tools.ant.taskdefs

Class BuildNumber


public class BuildNumber
extends Task

Read, increment, and write a build number in a file It will first attempt to read a build number from a file, then set the property "build.number" to the value that was read in (or 0 if no such value). Then it will increment the build number by one and write it back out into the file.

Version:
$Revision: 1.13.2.4 $ $Date: 2004/03/09 17:01:32 $

Since:
Ant 1.5

Field Summary

Fields inherited from class org.apache.tools.ant.Task

description, location, target, taskName, taskType, wrapper

Fields inherited from class org.apache.tools.ant.ProjectComponent

project

Method Summary

void
execute()
Run task.
void
setFile(File file)
The file in which the build number is stored.

Methods inherited from class org.apache.tools.ant.Task

execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Method Details

execute

public void execute()
            throws BuildException
Run task.
Overrides:
execute in interface Task

Throws:
BuildException - if an error occurs


setFile

public void setFile(File file)
The file in which the build number is stored. Defaults to "build.number" if not specified.

Parameters:
file - the file in which build number is stored.


Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.