code: protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException 
      {
          if (manifestFiles.size() != 0)
          {
              //
              // Create a default (empty) manifest
              //
              Manifest mergeManifest = Manifest.getDefaultManifest();
  
              //
              // Iterate through each found manifest file, merging its contents into the
              // merge manifest
              //
              for (File manifestFile : manifestFiles)
              {
                  FileInputStream fis = null;
                  try
                  {
                      fis = new FileInputStream(manifestFile);
                      Manifest resourceManifest = new Manifest(new InputStreamReader(fis));
                      mergeManifest.merge(resourceManifest);
                  }
                  catch (IOException ioe)
                  {
                      throw new BuildException("Unable to read manifest file:" + manifestFile, ioe);
                  }
                  catch (ManifestException me)
                  {
                      throw new BuildException("Unable to process manifest file: "+ manifestFile, me);
                  }
                  finally 
                  {
                      if (fis != null) fis.close();
                  }
              }
  
              //
              // Set the merge manifest as the 'configured' manifest.   This will treat its
              // contents as if they had been included inline with the <jar> task, with
              // similar precedence rules.
              //
              try
              {
                  addConfiguredManifest(mergeManifest);
              }
              catch (ManifestException me)
              {
                  throw new BuildException("Unable to add new manifest entries:" + me);
              }
          }
  
          super.initZipOutputStream(zOut);
      }
docs: Step #2: Override Jar.initZipOutputStream to inject manifest sections.  This is done
  by treating them as if they were 'inline' entries, from a <jar> task perspective.