com.rshtech.ant.taskdefs
Class VersionUtilityTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.rshtech.ant.taskdefs.VersionUtilityTask
- All Implemented Interfaces:
- java.lang.Cloneable
public class VersionUtilityTask
- extends org.apache.tools.ant.Task
Utility for working with version strings within a build file.
Usage from within ant is straight-forward:
<taskdef name="versionutility"
classname="com.rshtech.ant.VersionUtility">
<classpath>
...
</classpath>
</taskdef>
<versionutility increment="1.2.5" versionproperty="my.version"/>
<echo level="info">my.version == ${my.version}</echo>
<versionutility cvstagvalue="1.2.5" versionproperty="my.version2"/>
<echo level="info">my.version2 == ${my.version2}</echo>
If you do not specify the versionproperty, it defaults to "incremented.version"
or "cvstag.version"
- Version:
- $Revision: 3134 $
- Author:
- $Author: kostya $
| Fields inherited from class org.apache.tools.ant.Task |
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
description, location, project |
| Methods inherited from class org.apache.tools.ant.Task |
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 org.apache.tools.ant.ProjectComponent |
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_INCREMENT_VERSION_PROPERTY
public static final java.lang.String DEFAULT_INCREMENT_VERSION_PROPERTY
- See Also:
- Constant Field Values
DEFAULT_DECREMENT_VERSION_PROPERTY
public static final java.lang.String DEFAULT_DECREMENT_VERSION_PROPERTY
- See Also:
- Constant Field Values
DEFAULT_CVSTAG_VERSION_PROPERTY
public static final java.lang.String DEFAULT_CVSTAG_VERSION_PROPERTY
- See Also:
- Constant Field Values
VersionUtilityTask
public VersionUtilityTask()
execute
public void execute()
throws org.apache.tools.ant.BuildException
- Overrides:
execute in class org.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
getIncrement
public java.lang.String getIncrement()
setIncrement
public void setIncrement(java.lang.String increment)
getDecrement
public java.lang.String getDecrement()
setDecrement
public void setDecrement(java.lang.String decrement)
getCvsTagValue
public java.lang.String getCvsTagValue()
setCvsTagValue
public void setCvsTagValue(java.lang.String cvsTagValue)
getVersionProperty
public java.lang.String getVersionProperty()
setVersionProperty
public void setVersionProperty(java.lang.String versionProperty)
getChangeType
public java.lang.String getChangeType()
- Returns:
- Returns the changeType.
setChangeType
public void setChangeType(java.lang.String changeType)
- Parameters:
changeType - The changeType to set.