|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
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 | +--com.klg.jclass.jarmaster.JarMasterAntTask
This class is the glue that allows us to plug JarMaster into the Ant build system. The general format of the XML is:
<taskdef name="jarmaster" classname="com.klg.jclass.jarmaster.JarMasterAntTask"/> <jarmaster clearDefaults="yes" compressionLevel="${jar.compression}" output="${jar.location}/myJar.jar"> <classpath> <fileset dir="${destination.dir}/../jars"> <include name="collections.jar"/> <include name="JClass.jar"/> </fileset> <pathelement path="${destination.dir}"/> <pathelement path="${destination.dir}/.."/> </classpath> <!-- Package excludes can be either class names or package names --> <excludepackage name="com/quest/deploy/GenerateSignature.class"/> <excludepackage name="com/klg/jclass/beans"/> <manifest file="${source.dir}/${package}/manifest1.txt"/> <manifest file="${source.dir}/${package}/manifest2.txt"/> <fileset dir="${destination.dir}"> <include name="com/quest/deploy/servlet/deploydirector.gif"/> <include name="com/quest/deploy/servlet/deploydirector_ss.gif"/> <include name="com/quest/deploy/AbstractMessageQueue.class"/> </fileset> </jarmaster>The classpath elements and fileset/include elements follow the same rules as the standard Ant built in tasks. Make sure to consult the Ant documentation for more details.
Nested Class Summary | |
static class |
JarMasterAntTask.Manifest
|
Field Summary | |
protected String |
class_dir
|
protected boolean |
clear_defaults
|
protected int |
compression_level
|
protected org.apache.tools.ant.types.PatternSet |
excludedPackages
|
protected Vector |
filesets
|
protected boolean |
is_jar
|
protected org.apache.tools.ant.types.Path |
jarClasspath
|
protected com.klg.jclass.jarmaster.JarMasterLocaleManager |
lm
|
protected String |
main_class
|
protected File |
manifest_file
|
protected Vector |
manifests
|
protected File |
output_file
|
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 | |
JarMasterAntTask()
|
Method Summary | |
void |
addFileset(org.apache.tools.ant.types.FileSet set)
Adds a set of files (nested fileset attribute). |
String[] |
addToStringList(String[] stringList,
String[] newList)
|
org.apache.tools.ant.types.Path |
createClasspath()
Creates a nested classpath element. |
org.apache.tools.ant.types.PatternSet.NameEntry |
createExcludePackage()
Add a name entry to the list of packages to exclude. |
JarMasterAntTask.Manifest |
createManifest()
Add a manifest file to the list of manifest files |
void |
execute()
Called by Ant to excute this task. |
void |
setClasspath(org.apache.tools.ant.types.Path classpath)
Set the searchpath to be used for building the jar. |
void |
setClasspathRef(org.apache.tools.ant.types.Reference r)
Adds a reference to a classpath defined elsewhere. |
void |
setClearDefaults(String on_off)
Determines whether or not to use the default (project wide) exclude list. |
void |
setCompressionLevel(String value)
Sets the compression level for the created jar file. |
void |
setExcludepackageref(org.apache.tools.ant.types.Reference r)
Defines the exclude package pattern set from a reference. |
void |
setIsJar(String on_off)
Determines whether or not to create a jar or a zip file. |
void |
setMainClass(String name)
Sets the name of the main class for an executable jar |
void |
setManifest(File man)
Sets the file that is to be used as the manifest for the created jar. |
void |
setOutput(File name)
Sets the name of the created jar file. |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
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 |
Field Detail |
protected File manifest_file
protected String class_dir
protected String main_class
protected File output_file
protected boolean clear_defaults
protected boolean is_jar
protected int compression_level
protected org.apache.tools.ant.types.Path jarClasspath
protected Vector filesets
protected Vector manifests
protected com.klg.jclass.jarmaster.JarMasterLocaleManager lm
protected org.apache.tools.ant.types.PatternSet excludedPackages
Constructor Detail |
public JarMasterAntTask()
Method Detail |
public void setExcludepackageref(org.apache.tools.ant.types.Reference r)
r
- A pattern set reference.public org.apache.tools.ant.types.PatternSet.NameEntry createExcludePackage()
<excludepackage name="com/klg/jclass/beans"/> <excludepackage name="com/quest/deploy/tools/Build.class"/>and you can specify specific files or general package names. Make sure you understand how JarMaster expects these to be formatted (not full path) and how it processes the entries.
public void addFileset(org.apache.tools.ant.types.FileSet set)
public void setClearDefaults(String on_off)
false
.
on_off
- True if the project wide exclude list is to
be used and false if it is not.public void setIsJar(String on_off)
on_off
- True, if a jar is to be created (default). False, if a zip
file is to be created.public void setCompressionLevel(String value) throws org.apache.tools.ant.BuildException
-level
commandline option.
value
- Compression level for the created jar file. Valid
values are 0 (no compression) to 9 (max compression)
org.apache.tools.ant.BuildException
- If the provided value is not convertable to an
interger or is out of the range 0-9public void setManifest(File man)
man
- Name of the manifest file to use. This can be either
relative to the current directoy or an absolute path.public JarMasterAntTask.Manifest createManifest()
public void setClasspath(org.apache.tools.ant.types.Path classpath)
public org.apache.tools.ant.types.Path createClasspath()
public void setClasspathRef(org.apache.tools.ant.types.Reference r)
public void setOutput(File name)
public void setMainClass(String name)
public String[] addToStringList(String[] stringList, String[] newList)
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |