-savemanifest FILE
Description: /** * Get the manifest and write it out separately if -savemanifest is set * * @param dot */ private void doSaveManifest(Jar dot) throws Exception { String output = getProperty(SAVEMANIFEST); if (output == null) return;
Date: 2019-10-12T19:48:23-04:00

- # -savemanifest FILE

      /**
       * Get the manifest and write it out separately if -savemanifest is set
       *
       * @param dot
       */
      private void doSaveManifest(Jar dot) throws Exception {
      	String output = getProperty(SAVEMANIFEST);
      	if (output == null)
      		return;

      	File f = getFile(output);
      	if (f.isDirectory()) {
      		f = new File(f, "MANIFEST.MF");
      	}
      	f.delete();
      	File fp = f.getParentFile();
      	if (!fp.exists() && !fp.mkdirs()) {
      		throw new IOException("Could not create directory " + fp);
      	}
      	OutputStream out = new FileOutputStream(f);
      	try {
      		Jar.writeManifest(dot.getManifest(), out);
      	}
      	finally {
      		out.close();
      	}
      	changedFile(f);
      }