Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class ManifestClassPath

extends Task
Class Inheritance
Imports
java.io.File, org.apache.tools.ant.BuildException, .Task, org.apache.tools.ant.launch.Locator, org.apache.tools.ant.types.Path, org.apache.tools.ant.util.FileUtils

Converts a Path into a property suitable as a Manifest classpath.
Since
Ant 1.7

Field Summary

Modifier and TypeField and Description
private File
dir

The directory the classpath will be relative from.

private int
maxParentLevels

The maximum parent directory level to traverse.

private String
name

The property name to hold the classpath value.

private Path
path

The classpath to convert.

Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addClassPath(Path
the classpath to convert.
path
)

Adds the classpath to convert.

public void
execute()

Overrides org.apache.tools.ant.Task.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.
public void
setJarFile(File
the JAR file. Need not exist yet, but its parent directory must exist on the other hand.
jarfile
)

The JAR file to contain the classpath attribute in its manifest.

public void
setMaxParentLevels(int
the max level. Defaults to 2.
levels
)

Sets the maximum parent directory levels allowed when computing a relative path.

public void
setProperty(String
the property name
name
)

Sets the property name to hold the classpath value.

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

dirback to summary
private File dir

The directory the classpath will be relative from.

maxParentLevelsback to summary
private int maxParentLevels

The maximum parent directory level to traverse.

nameback to summary
private String name

The property name to hold the classpath value.

pathback to summary
private Path path

The classpath to convert.

Constructor Detail

ManifestClassPathback to summary
public ManifestClassPath()

Method Detail

addClassPathback to summary
public void addClassPath(Path path)

Adds the classpath to convert.

Parameters
path:Path

the classpath to convert.

executeback to summary
public void execute()

Overrides org.apache.tools.ant.Task.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.

Annotations
@Override
setJarFileback to summary
public void setJarFile(File jarfile)

The JAR file to contain the classpath attribute in its manifest.

Parameters
jarfile:File

the JAR file. Need not exist yet, but its parent directory must exist on the other hand.

setMaxParentLevelsback to summary
public void setMaxParentLevels(int levels)

Sets the maximum parent directory levels allowed when computing a relative path.

Parameters
levels:int

the max level. Defaults to 2.

setPropertyback to summary
public void setProperty(String name)

Sets the property name to hold the classpath value.

Parameters
name:String

the property name