Examples of addConfiguredAttribute()


Examples of org.apache.tools.ant.taskdefs.Manifest.addConfiguredAttribute()

            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) {
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Manifest.addConfiguredAttribute()

            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

Examples of org.apache.tools.ant.taskdefs.Manifest.Section.addConfiguredAttribute()

            Section section = new Section();
            section.setName(entry.getKey());
            try {
                antManifest.addConfiguredSection(section);
                for (Map.Entry<String, Object> attributeEntry : entry.getValue().entrySet()) {
                    section.addConfiguredAttribute(new Attribute(attributeEntry.getKey().toString(), attributeEntry.getValue().toString()));
                }
            } catch (ManifestException e) {
                throw new org.gradle.api.java.archives.ManifestException(e.getMessage(), e);
            }
        }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.ManifestTask.addConfiguredAttribute()

    mainClass.setValue(task.getMainClass());

    ManifestTask manifest = (ManifestTask) task.createSubtask(ManifestTask.class);
    manifest.setFile(manifestFile);
    try {
      manifest.addConfiguredAttribute(mainClass);
    } catch (ManifestException e) {
      throw new BuildException("Manifest error", e);
    }

    manifest.execute();
View Full Code Here

Examples of org.codehaus.plexus.archiver.jar.Manifest.addConfiguredAttribute()

                final Map<Object, Object> attrs = manifest.getMainAttributes();
                for(final Map.Entry<Object, Object> entry : attrs.entrySet()) {
                    final String key = entry.getKey().toString();
                    if ( !BuildConstants.ATTRS_EXCLUDES.contains(key)) {
                        final Attribute a = new Attribute(key, entry.getValue().toString());
                        outManifest.addConfiguredAttribute(a);
                    }
                    if ( key.equals(BuildConstants.ATTR_MAIN_CLASS) ) {
                        hasMain = true;
                    }
                }
View Full Code Here

Examples of org.codehaus.plexus.archiver.jar.Manifest.addConfiguredAttribute()

                    if ( key.equals(BuildConstants.ATTR_MAIN_CLASS) ) {
                        hasMain = true;
                    }
                }
            }
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_BUILD,
                            project.getVersion()));
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VERSION,
                            project.getVersion()));

            String organizationName = project.getOrganization() != null ? project.getOrganization().getName() : null;
View Full Code Here

Examples of org.codehaus.plexus.archiver.jar.Manifest.addConfiguredAttribute()

                    }
                }
            }
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_BUILD,
                            project.getVersion()));
            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VERSION,
                            project.getVersion()));

            String organizationName = project.getOrganization() != null ? project.getOrganization().getName() : null;
            if ( organizationName != null ) {
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR,
View Full Code Here

Examples of org.codehaus.plexus.archiver.jar.Manifest.addConfiguredAttribute()

            outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VERSION,
                            project.getVersion()));

            String organizationName = project.getOrganization() != null ? project.getOrganization().getName() : null;
            if ( organizationName != null ) {
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_CREATED_BY,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_BUILT_BY,
                            organizationName));
View Full Code Here

Examples of org.codehaus.plexus.archiver.jar.Manifest.addConfiguredAttribute()

            String organizationName = project.getOrganization() != null ? project.getOrganization().getName() : null;
            if ( organizationName != null ) {
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_CREATED_BY,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_BUILT_BY,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_VENDOR,
                        organizationName));
View Full Code Here

Examples of org.codehaus.plexus.archiver.jar.Manifest.addConfiguredAttribute()

            if ( organizationName != null ) {
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_CREATED_BY,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_BUILT_BY,
                            organizationName));
                outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_VENDOR,
                        organizationName));
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.