org.apache.tools.ant.taskdefs

Class Ear

public class Ear extends Jar

Creates a EAR archive. Based on WAR task

Since: Ant 1.4

UNKNOWN: category="packaging"

Constructor Summary
Ear()
Create an Ear task.
Method Summary
voidaddArchives(ZipFileSet fs)
Adds zipfileset.
protected voidcleanUp()
Make sure we don't think we already have a application.xml next time this task gets executed.
protected voidinitZipOutputStream(ZipOutputStream zOut)
Initialize the output stream.
voidsetAppxml(File descr)
File to incorporate as application.xml.
voidsetEarfile(File earFile)
Set the destination file.
protected voidzipFile(File file, ZipOutputStream zOut, String vPath, int mode)
Overridden from Zip class to deal with application.xml

Constructor Detail

Ear

public Ear()
Create an Ear task.

Method Detail

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.

initZipOutputStream

protected void initZipOutputStream(ZipOutputStream zOut)
Initialize the output stream.

Parameters: zOut the zip output stream.

Throws: IOException on I/O errors 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)
Overridden from Zip class to deal with application.xml

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.

Throws: IOException on error