Class Ear

All Implemented Interfaces:
Cloneable, SelectorContainer

public class Ear extends Jar
Creates a EAR archive. Based on WAR task
Since:
Ant 1.4
  • Constructor Details

    • Ear

      public Ear()
      Create an Ear task.
  • Method Details

    • setEarfile

      @Deprecated public void setEarfile(File earFile)
      Deprecated.
      since 1.5.x. Use setDestFile(destfile) instead.
      Set the destination file.
      Parameters:
      earFile - the destination file
    • setAppxml

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

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

      protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException
      Initialize the output stream.
      Overrides:
      initZipOutputStream in class Jar
      Parameters:
      zOut - the zip output stream.
      Throws:
      IOException - on I/O errors
      BuildException - on other errors
    • 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 class 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.
      Throws:
      IOException - on error
    • 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 class Jar
      See Also: