Package org.apache.tools.ant.taskdefs.Manifest

Examples of org.apache.tools.ant.taskdefs.Manifest.Attribute


            java.util.jar.Manifest jmanifest = jis.getManifest();
            java.util.jar.Attributes jattributes = jmanifest.getMainAttributes();
            try {
                // Specify our Created-By and Main-Class attributes as overrides.
              configureManifest(manifest);
                manifest.addConfiguredAttribute(new Attribute(MAIN_CLASS, jattributes.getValue(MAIN_CLASS)));
                if (oneJarMainClass != null) {
                    manifest.addConfiguredAttribute(new Attribute(Boot.ONE_JAR_MAIN_CLASS, oneJarMainClass));
                }
                super.addConfiguredManifest(manifest);
            } catch (ManifestException mx) {
                throw new BuildException(mx);
            }
View Full Code Here


  }
 
  void setManifest(Manifest man, String key, String value) {
    if (!StringUtils.isEmpty(value)) {
      try {
        man.addConfiguredAttribute(new Attribute(key, value));
      } catch (ManifestException e) {
        console.error(e, "Failed to set manifest attribute \"{0}\"!", key);
      }
    }
  }
View Full Code Here

  }
 
  void setManifest(Manifest man, String key, String value) {
    if (!StringUtils.isEmpty(value)) {
      try {
        man.addConfiguredAttribute(new Attribute(key, value));
      } catch (ManifestException e) {
        console.error(e, "Failed to set manifest attribute \"{0}\"!", key);
      }
    }
  }
View Full Code Here

            Manifest manifest = new Manifest();
            java.util.jar.Manifest jmanifest = jis.getManifest();
            java.util.jar.Attributes jattributes = jmanifest.getMainAttributes();
            try {
                // Specify our Created-By and Main-Class attributes as overrides.
                manifest.addConfiguredAttribute(new Attribute("Created-By", "One-Jar 0.98 Ant taskdef"));
                manifest.addConfiguredAttribute(new Attribute(MAIN_CLASS, jattributes.getValue(MAIN_CLASS)));
                if (oneJarMainClass != null) {
                    manifest.addConfiguredAttribute(new Attribute(Boot.ONE_JAR_MAIN_CLASS, oneJarMainClass));
                }
                super.addConfiguredManifest(manifest);
            } catch (ManifestException mx) {
                throw new BuildException(mx);
            }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.taskdefs.Manifest.Attribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.