Package org.apache.tools.ant.taskdefs
Class ManifestClassPath
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.ManifestClassPath
- All Implemented Interfaces:
- Cloneable
Converts a Path into a property suitable as a Manifest classpath.
- Since:
- Ant 1.7
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddClassPath(Path path) Adds the classpath to convert.voidexecute()Sets a property, which must not already exist, with a space separated list of files and directories relative to the jar file's parent directory.voidsetJarFile(File jarfile) The JAR file to contain the classpath attribute in its manifest.voidsetMaxParentLevels(int levels) Sets the maximum parent directory levels allowed when computing a relative path.voidsetProperty(String name) Sets the property name to hold the classpath value.Methods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
- 
Constructor Details- 
ManifestClassPathpublic ManifestClassPath()
 
- 
- 
Method Details- 
executepublic void execute()Sets a property, which must not already exist, with a space separated list of files and directories relative to the jar file's parent directory.
- 
setPropertySets the property name to hold the classpath value.- Parameters:
- name- the property name
 
- 
setJarFileThe JAR file to contain the classpath attribute in its manifest.- Parameters:
- jarfile- the JAR file. Need not exist yet, but its parent directory must exist on the other hand.
 
- 
setMaxParentLevelspublic void setMaxParentLevels(int levels) Sets the maximum parent directory levels allowed when computing a relative path.- Parameters:
- levels- the max level. Defaults to 2.
 
- 
addClassPathAdds the classpath to convert.- Parameters:
- path- the classpath to convert.
 
 
-