|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.sadun.util.ant.Pack
An ant task to pack dependencies on a given set of classes.
The available attributes are:
Additional classpath can be also specified by a nested <classpath>
element.
<pack> also supports inclusion of explicitly named additional classes and/or files in the jar. Dependencies for such additional classes will be computed and added too. This is done by declaring internal <additionalclass> and <additionalfileset> elements.
<additionalclass> has a single name attribute which contains the fully qualified name of the class to include. The class must:
For example,
<additionalclass name="javax.transaction.TransactionManager"/>will add the
javax.transaction.TransactionManager
class and
all its dependent classes to the produced jar.
<additionalfileset> is a standard Ant FileSet
structure which specifies a set of files to unconditionally add to the
produced jar.
For example,
<additionalfileset dir="${basedir}"> <include name="META-INF/services/*"/> </additionalfileset>
will add any file under the META-INF/service
subdirectory of
the current ${basedir}
directory.
$Revision$
Field Summary |
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 |
Constructor Summary | |
Pack()
|
Method Summary | |
void |
addAdditionalFileSet(org.apache.tools.ant.types.FileSet fs)
Ant entry point for additionalfileset subelements.
|
ClassSpec |
createAdditionalClass()
Ant entry point for additionalClass subelements.
|
org.apache.tools.ant.types.Path |
createClassPath()
Ant entry point for classpath subelements. |
ClassSpec |
createIgnoreClass()
Ant entry point for ignoreClass subelements.
|
Resource |
createResource()
Ant entry point for additionalClass subelements.
|
void |
execute()
Execute the task. |
java.lang.String |
getClasses()
Returns the classes. |
java.lang.String |
getClasspath()
Returns the classpath. |
java.lang.String |
getExcludePkg()
Returns the excludePkg. |
java.lang.String |
getIncludePkg()
Returns the includePkg. |
java.lang.String |
getManifestClassPath()
Returns the manifestClassPath. |
java.lang.String |
getManifestMainClass()
Returns the manifestMainClass. |
java.lang.String |
getPackages()
Returns the packages. |
boolean |
getResolveFiltered()
Returns the resolveFiltered. |
java.lang.String |
getTargetJar()
Returns the targetJar. |
boolean |
isCacheClassFiles()
Returns the cacheClassFiles. |
void |
setCacheClassFiles(boolean cacheClassFiles)
Sets the cacheClassFiles. |
void |
setClasses(java.lang.String classes)
Sets the classes. |
void |
setClasspath(java.lang.String classpath)
Sets the classpath. |
void |
setExcludePkg(java.lang.String excludePkg)
Sets the excludePkg. |
void |
setIncludePkg(java.lang.String includePkg)
Sets the includePkg. |
void |
setManifestClassPath(java.lang.String manifestClassPath)
Sets the manifestClassPath. |
void |
setManifestMainClass(java.lang.String manifestMainClass)
Sets the manifestMainClass. |
void |
setPackages(java.lang.String packages)
Sets the packages. |
void |
setResolveFiltered(boolean resolveFiltered)
Sets the resolveFiltered. |
void |
setTargetJar(java.lang.String targetJar)
Sets the targetJar. |
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 |
Constructor Detail |
public Pack()
Method Detail |
public void execute() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
Task.execute()
public java.lang.String getClasses()
public void setClasses(java.lang.String classes)
classes
- The classes to setpublic java.lang.String getTargetJar()
public void setTargetJar(java.lang.String targetJar)
targetJar
- The targetJar to setpublic boolean getResolveFiltered()
public void setResolveFiltered(boolean resolveFiltered)
resolveFiltered
- The resolveFiltered to setpublic java.lang.String getExcludePkg()
public void setExcludePkg(java.lang.String excludePkg)
excludePkg
- The excludePkg to setpublic org.apache.tools.ant.types.Path createClassPath()
classpath
subelements.
public java.lang.String getClasspath()
public void setClasspath(java.lang.String classpath)
classpath
- The classpath to setpublic java.lang.String getManifestClassPath()
public java.lang.String getManifestMainClass()
public void setManifestClassPath(java.lang.String manifestClassPath)
manifestClassPath
- The manifestClassPath to setpublic void setManifestMainClass(java.lang.String manifestMainClass)
manifestMainClass
- The manifestMainClass to setpublic java.lang.String getIncludePkg()
public void setIncludePkg(java.lang.String includePkg)
includePkg
- The includePkg to setpublic void addAdditionalFileSet(org.apache.tools.ant.types.FileSet fs)
additionalfileset
subelements.
fs
- the fileset object to add, created by Ant enginepublic ClassSpec createAdditionalClass()
additionalClass
subelements.
public ClassSpec createIgnoreClass()
ignoreClass
subelements.
public Resource createResource()
additionalClass
subelements.
public boolean isCacheClassFiles()
public void setCacheClassFiles(boolean cacheClassFiles)
cacheClassFiles
- The cacheClassFiles to setpublic java.lang.String getPackages()
public void setPackages(java.lang.String packages)
packages
- The packages to set
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |