Class BuildNumber

  extended by
      extended by
          extended by
All Implemented Interfaces:

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.

Ant 1.5

Field Summary
Fields inherited from class
target, taskName, taskType, wrapper
Fields inherited from class
description, location, project
Constructor Summary
Method Summary
 void execute()
          Run task.
 void setFile( file)
          The file in which the build number is stored.
Methods inherited from class
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public BuildNumber()
Method Detail


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

file - the file in which build number is stored.


public void execute()
             throws BuildException
Run task.

execute in class Task
BuildException - if an error occurs