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

public Class Ear

extends Jar
Class Inheritance
Imports
java.io.File, .IOException, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.types.ZipFileSet, org.apache.tools.ant.util.FileUtils, org.apache.tools.zip.ZipOutputStream

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

Field Summary

Modifier and TypeField and Description
private File
private boolean
private static final FileUtils
private static final String

Constructor Summary

AccessConstructor and Description
public
Ear()

Create an Ear task.

Method Summary

Modifier and TypeMethod and Description
public void
addArchives(ZipFileSet
zipfileset to add
fs
)

Adds zipfileset.

protected void
cleanUp()

Overrides org.apache.tools.ant.taskdefs.Jar.cleanUp.

Make sure we don't think we already have a application.xml next time this task gets executed.
protected void
initZipOutputStream(ZipOutputStream
the zip output stream.
zOut
)

Overrides org.apache.tools.ant.taskdefs.Jar.initZipOutputStream.

Initialize the output stream.
public void
setAppxml(File
the descriptor file
descr
)

File to incorporate as application.xml.

public void
setEarfile(File
the destination file
earFile
)

Deprecated since 1.5.x. Use setDestFile(destfile) instead.
Set the destination file.
protected void
zipFile(File
the file to add to the archive
file
,
ZipOutputStream
the stream to write to
zOut
,
String
the name this entry shall have in the archive
vPath
,
int
the Unix permissions to set.
mode
)

Overrides org.apache.tools.ant.taskdefs.Zip.zipFile.

Overridden from Zip class to deal with application.xml
Inherited from org.apache.tools.ant.taskdefs.Jar:
addConfiguredIndexJarsaddConfiguredIndexJarsMapperaddConfiguredManifestaddConfiguredServiceaddMetainfcreateEmptyZipfinalizeZipOutputStreamfindJarNamegetIndexJarsMappergetResourcesToAddgrabFilesAndDirsresetsetFilesetmanifestsetFlattenAttributessetIndexsetIndexMetaInfsetJarfilesetManifestsetManifestEncodingsetMergeClassPathAttributessetStrictsetWhenemptysetWhenmanifestonlywriteIndexLikeListzipFile

Field Detail

deploymentDescriptorback to summary
private File deploymentDescriptor
descriptorAddedback to summary
private boolean descriptorAdded
FILE_UTILSback to summary
private static final FileUtils FILE_UTILS

Hides org.apache.tools.ant.taskdefs.Zip.FILE_UTILS.

XML_DESCRIPTOR_PATHback to summary
private static final String XML_DESCRIPTOR_PATH

Constructor Detail

Earback to summary
public Ear()

Create an Ear task.

Method Detail

addArchivesback to summary
public void addArchives(ZipFileSet fs)

Adds zipfileset.

Parameters
fs:ZipFileSet

zipfileset to add

cleanUpback to summary
protected void cleanUp()

Overrides org.apache.tools.ant.taskdefs.Jar.cleanUp.

Make sure we don't think we already have a application.xml next time this task gets executed.

Annotations
@Override
initZipOutputStreamback to summary
protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException

Overrides org.apache.tools.ant.taskdefs.Jar.initZipOutputStream.

Initialize the output stream.

Parameters
zOut:ZipOutputStream

the zip output stream.

Annotations
@Override
Exceptions
IOException:
on I/O errors
BuildException:
on other errors
setAppxmlback to summary
public void setAppxml(File descr)

File to incorporate as application.xml.

Parameters
descr:File

the descriptor file

setEarfileback to summary
public void setEarfile(File earFile)

Deprecated

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

Set the destination file.

Parameters
earFile:File

the destination file

Annotations
@Deprecated
zipFileback to summary
protected void zipFile(File file, ZipOutputStream zOut, String vPath, int mode) throws IOException

Overrides org.apache.tools.ant.taskdefs.Zip.zipFile.

Overridden from Zip class to deal with application.xml

Parameters
file:File

the file to add to the archive

zOut:ZipOutputStream

the stream to write to

vPath:String

the name this entry shall have in the archive

mode:int

the Unix permissions to set.

Annotations
@Override
Exceptions
IOException:
on error