code: private void addFilesToArchive(ZipArchiver archiver, File sourceDir) throws Exception
      {
          File generatedPackageFile = new File(sourceDir, PACKAGE_XML);
          if (generatedPackageFile.exists()) {
              generatedPackageFile.delete();
          }
  
          archiver.addDirectory(sourceDir, getIncludes(), getExcludes());
          generatePackageXml(generatedPackageFile, archiver.getFiles().values());
          archiver.addFile(generatedPackageFile, PACKAGE_XML);
      }
docs: Adds the files from a specific directory to an archive. It also builds a package.xml file based on that content
  which is also added to the archive.
  
  @param archiver the archive in which the files will be added
  @param sourceDir the directory whose contents will be added to the archive
  @throws Exception if the files cannot be added to the archive