org.apache.tools.ant.taskdefs
Class War
java.lang.Object
|
+--org.apache.tools.ant.Task
|
+--org.apache.tools.ant.taskdefs.MatchingTask
|
+--org.apache.tools.ant.taskdefs.Zip
|
+--org.apache.tools.ant.taskdefs.Jar
|
+--org.apache.tools.ant.taskdefs.War
- public class War
- extends Jar
Creates a WAR archive.
- Author:
- Stefan Bodewig
Constructor Summary |
War()
|
Method Summary |
void |
addClasses(FileSet fs)
|
protected void |
addFiles(java.util.Vector v,
java.util.zip.ZipOutputStream zOut,
java.lang.String prefix)
Iterate over the given Vector of filesets and add all files to the
ZipOutputStream using the given prefix. |
void |
addLib(FileSet fs)
|
protected void |
addScanners(FileScanner[] scanners,
int startIndex,
java.util.Vector fileSets)
Add a DirectoryScanner for each FileSet included in fileSets to scanners
starting with index startIndex. |
void |
addWebinf(FileSet fs)
|
protected void |
initZipOutputStream(java.util.zip.ZipOutputStream zOut)
Add the deployment descriptor as well as all files added the
special way of nested lib, classes or webinf filesets. |
protected boolean |
isUpToDate(FileScanner[] scanners,
java.io.File zipFile)
Check whether the archive is up-to-date; and handle behavior for empty archives. |
void |
setWarfile(java.io.File warFile)
|
void |
setWebxml(java.io.File descr)
|
protected void |
zipFile(java.io.File file,
java.util.zip.ZipOutputStream zOut,
java.lang.String vPath)
|
Methods inherited from class org.apache.tools.ant.taskdefs.Zip |
addFiles, addFileset, addParentDirs, execute, grabFiles, setBasedir, setCompress, setWhenempty, setZipfile, zipDir, zipFile |
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
createExclude, createInclude, createPatternSet, getDirectoryScanner, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
War
public War()
setWarfile
public void setWarfile(java.io.File warFile)
setWebxml
public void setWebxml(java.io.File descr)
addLib
public void addLib(FileSet fs)
addClasses
public void addClasses(FileSet fs)
addWebinf
public void addWebinf(FileSet fs)
initZipOutputStream
protected void initZipOutputStream(java.util.zip.ZipOutputStream zOut)
throws java.io.IOException,
BuildException
- Add the deployment descriptor as well as all files added the
special way of nested lib, classes or webinf filesets.
- Overrides:
initZipOutputStream
in class Jar
isUpToDate
protected boolean isUpToDate(FileScanner[] scanners,
java.io.File zipFile)
throws BuildException
- Description copied from class:
Zip
- Check whether the archive is up-to-date; and handle behavior for empty archives.
- Overrides:
isUpToDate
in class Jar
- Following copied from class:
org.apache.tools.ant.taskdefs.Zip
- Parameters:
scanners
- list of prepared scanners containing files to archivezipFile
- intended archive file (may or may not exist)- Returns:
- true if nothing need be done (may have done something already); false if
archive creation should proceed
- Throws:
BuildException
- if it likes
zipFile
protected void zipFile(java.io.File file,
java.util.zip.ZipOutputStream zOut,
java.lang.String vPath)
throws java.io.IOException
- Overrides:
zipFile
in class Jar
addScanners
protected void addScanners(FileScanner[] scanners,
int startIndex,
java.util.Vector fileSets)
- Add a DirectoryScanner for each FileSet included in fileSets to scanners
starting with index startIndex.
addFiles
protected void addFiles(java.util.Vector v,
java.util.zip.ZipOutputStream zOut,
java.lang.String prefix)
throws java.io.IOException
- Iterate over the given Vector of filesets and add all files to the
ZipOutputStream using the given prefix.
Copyright © 2000 Apache Software Foundation. All Rights Reserved.