org.apache.tools.ant.taskdefs

Class Ear

Implemented Interfaces:
Cloneable, SelectorContainer

public class Ear
extends Jar

Creates a EAR archive. Based on WAR task
Since:
Ant 1.4

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Jar

Jar.FilesetManifestConfig

Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Zip

Zip.ArchiveState, Zip.Duplicate, Zip.WhenEmpty

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.Jar

emptyBehavior

Fields inherited from class org.apache.tools.ant.taskdefs.Zip

addedDirs, archiveType, doubleFilePass, duplicate, emptyBehavior, entries, skipWriting, zipFile

Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask

fileset

Fields inherited from class org.apache.tools.ant.Task

target, taskName, taskType, wrapper

Fields inherited from class org.apache.tools.ant.ProjectComponent

description, location, project

Constructor Summary

Ear()
Create an Ear task.

Method Summary

void
addArchives(ZipFileSet fs)
Adds zipfileset.
protected void
cleanUp()
Make sure we don't think we already have a application.xml next time this task gets executed.
protected void
initZipOutputStream(ZipOutputStream zOut)
Initialize the output stream.
void
setAppxml(File descr)
File to incorporate as application.xml.
void
setEarfile(File earFile)
Deprecated. since 1.5.x.
protected void
zipFile(File file, ZipOutputStream zOut, String vPath, int mode)
Overridden from Zip class to deal with application.xml

Methods inherited from class org.apache.tools.ant.taskdefs.Jar

addConfiguredIndexJars, addConfiguredManifest, addConfiguredService, addMetainf, cleanUp, createEmptyZip, finalizeZipOutputStream, findJarName, getResourcesToAdd, grabFilesAndDirs, initZipOutputStream, reset, setFilesetmanifest, setIndex, setJarfile, setManifest, setManifestEncoding, setWhenempty, setWhenmanifestonly, writeIndexLikeList, zipFile

Methods inherited from class org.apache.tools.ant.taskdefs.Zip

add, addFileset, addParentDirs, addResources, addResources, addZipGroupFileset, addZipfileset, cleanUp, createEmptyZip, execute, executeMain, finalizeZipOutputStream, getComment, getDestFile, getEncoding, getLevel, getNonFileSetResourcesToAdd, getResourcesToAdd, getResourcesToAdd, grabNonFileSetResources, grabResources, initZipOutputStream, isAddingNewFiles, isCompress, isEmpty, isInUpdateMode, reset, selectFileResources, setBasedir, setComment, setCompress, setDestFile, setDuplicate, setEncoding, setFile, setFilesonly, setKeepCompression, setLevel, setRoundUp, setUpdate, setWhenempty, setZipfile, zipDir, zipDir, zipFile, zipFile

Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask

XsetIgnore, XsetItems, add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject

Methods inherited from class org.apache.tools.ant.Task

bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

Methods inherited from class org.apache.tools.ant.ProjectComponent

clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject

Constructor Details

Ear

public Ear()
Create an Ear task.

Method Details

addArchives

public void addArchives(ZipFileSet fs)
Adds zipfileset.
Parameters:
fs - zipfileset to add

cleanUp

protected void cleanUp()
Make sure we don't think we already have a application.xml next time this task gets executed.
Overrides:
cleanUp in interface Jar

initZipOutputStream

protected void initZipOutputStream(ZipOutputStream zOut)
            throws IOException,
                   BuildException
Initialize the output stream.
Overrides:
initZipOutputStream in interface Jar
Parameters:
zOut - the zip output stream.
Throws:
BuildException - on other errors

setAppxml

public void setAppxml(File descr)
File to incorporate as application.xml.
Parameters:
descr - the descriptor file

setEarfile

public void setEarfile(File earFile)

Deprecated. since 1.5.x. Use setDestFile(destfile) instead.

Set the destination file.
Parameters:
earFile - the destination file

zipFile

protected void zipFile(File file,
                       ZipOutputStream zOut,
                       String vPath,
                       int mode)
            throws IOException
Overridden from Zip class to deal with application.xml
Overrides:
zipFile in interface Zip
Parameters:
file - the file to add to the archive
zOut - the stream to write to
vPath - the name this entry shall have in the archive
mode - the Unix permissions to set.