org.sadun.util.ant
Class BaseVersion
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.sadun.util.ant.BaseVersion
- Direct Known Subclasses:
- Version
- public class BaseVersion
- extends org.apache.tools.ant.Task
- Author:
- Cristiano Sadun
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 |
Methods inherited from class org.apache.tools.ant.Task |
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, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
packageName
protected java.lang.String packageName
versionClsPackageName
protected java.lang.String versionClsPackageName
versionFQClsName
protected java.lang.String versionFQClsName
versionInfoPath
protected java.io.File versionInfoPath
versionSimpleClsName
protected java.lang.String versionSimpleClsName
BUILD_NUMBER_PROPERTY_NAME
protected static final java.lang.String BUILD_NUMBER_PROPERTY_NAME
- See Also:
- Constant Field Values
useExistingVersionClass
protected boolean useExistingVersionClass
versionObjectBinaryPath
protected java.io.File versionObjectBinaryPath
versionObjectSourcePath
protected java.io.File versionObjectSourcePath
BaseVersion
public BaseVersion()
execute
public void execute()
throws org.apache.tools.ant.BuildException
- Throws:
org.apache.tools.ant.BuildException
baseName
protected java.lang.String baseName(java.lang.String s)
- Returns:
frontName
protected java.lang.String frontName(java.lang.String s)
- Returns:
mkVersionClsName
protected java.lang.String mkVersionClsName(java.lang.String packageName)
- Composte the version class name.
- Parameters:
packageName
-
- Returns:
computeLastBuildNumber
protected long computeLastBuildNumber()
throws org.apache.tools.ant.BuildException
- Find out the last build number, either by looking in the versionInfo file
or looking for an existing object in class path
- Throws:
org.apache.tools.ant.BuildException
getExistingVersionObject
protected Version getExistingVersionObject()
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
getExistingBuildNumber
protected java.util.Properties getExistingBuildNumber()
- Returns:
getPackageName
public java.lang.String getPackageName()
- Returns:
- Returns the packageName.
setPackageName
public void setPackageName(java.lang.String packageName)
- Parameters:
packageName
- The packageName to set.
getVersionInfoPath
public java.io.File getVersionInfoPath()
- Returns:
- Returns the versionInfoPath.
getVersionObjectBinaryPath
public java.io.File getVersionObjectBinaryPath()
- Returns:
- Returns the versionObjectPath.
getVersionObjectSourcePath
public java.io.File getVersionObjectSourcePath()
- Returns:
- Returns the versionObjectSourcePath.
setVersionInfoPath
public void setVersionInfoPath(java.io.File versionInfoPath)
- Parameters:
versionInfoPath
- The versionInfoPath to set.
setVersionObjectBinaryPath
public void setVersionObjectBinaryPath(java.io.File versionObjectPath)
- Parameters:
versionObjectPath
- The versionObjectPath to set.
setVersionObjectSourcePath
public void setVersionObjectSourcePath(java.io.File versionObjectSourcePath)
- Parameters:
versionObjectSourcePath
- The versionObjectSourcePath to set.