Package org.codehaus.plexus.archiver.jar

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


                    Manifest.Attribute archExtNameAttr = new Manifest.Attribute(
                        artifact.getArtifactId() + "-Extension-Name", artifact.getArtifactId() );
                    m.addConfiguredAttribute( archExtNameAttr );
                    String name = artifact.getArtifactId() + "-Implementation-Version";
                    Manifest.Attribute archImplVersionAttr = new Manifest.Attribute( name, artifact.getVersion() );
                    m.addConfiguredAttribute( archImplVersionAttr );

                    if ( artifact.getRepository() != null )
                    {
                        // TODO: is this correct
                        name = artifact.getArtifactId() + "-Implementation-URL";
View Full Code Here


                    {
                        // TODO: is this correct
                        name = artifact.getArtifactId() + "-Implementation-URL";
                        String url = artifact.getRepository().getUrl() + "/" + artifact.toString();
                        Manifest.Attribute archImplUrlAttr = new Manifest.Attribute( name, url );
                        m.addConfiguredAttribute( archImplUrlAttr );
                    }
                }
            }
        }
View Full Code Here

            for ( Iterator iter = keys.iterator(); iter.hasNext(); )
            {
                String key = (String) iter.next();
                String value = (String) entries.get( key );
                Manifest.Attribute attr = new Manifest.Attribute( key, value );
                manifest.addConfiguredAttribute( attr );
            }
        }

        // any custom manifest sections in the archive configuration manifest?
        if ( !archiveConfiguration.isManifestSectionsEmpty() )
View Full Code Here

        Manifest manifest = new Manifest();

        Manifest.Attribute mainClassAtt = new Manifest.Attribute();
        mainClassAtt.setName("Main-Class");
        mainClassAtt.setValue(Runner.class.getName());
        manifest.addConfiguredAttribute(mainClassAtt);

        aos.putArchiveEntry(new JarArchiveEntry("META-INF/MANIFEST.MF"));
        manifest.write(aos);
        aos.closeArchiveEntry();
View Full Code Here

                classPathAttr.setValue( earManifestClassPathEntry );
            }
            else
            {
                final Manifest.Attribute attr = new Manifest.Attribute( CLASS_PATH_KEY, earManifestClassPathEntry );
                manifest.addConfiguredAttribute( attr );
            }
        }
        return manifest;
    }
View Full Code Here

                classPathAttr.setValue( earManifestClassPathEntry );
            }
            else
            {
                final Manifest.Attribute attr = new Manifest.Attribute( CLASS_PATH_KEY, earManifestClassPathEntry );
                manifest.addConfiguredAttribute( attr );
            }
        }
        return manifest;
    }
View Full Code Here

        Manifest manifest = new Manifest();

        Manifest.Attribute mainClassAtt = new Manifest.Attribute();
        mainClassAtt.setName("Main-Class");
        mainClassAtt.setValue(Runner.class.getName());
        manifest.addConfiguredAttribute(mainClassAtt);

        aos.putArchiveEntry(new JarArchiveEntry("META-INF/MANIFEST.MF"));
        manifest.write(aos);
        aos.closeArchiveEntry();
View Full Code Here

        Manifest manifest = new Manifest();

        Manifest.Attribute mainClassAtt = new Manifest.Attribute();
        mainClassAtt.setName("Main-Class");
        mainClassAtt.setValue(Runner.class.getName());
        manifest.addConfiguredAttribute(mainClassAtt);

        aos.putArchiveEntry(new JarArchiveEntry("META-INF/MANIFEST.MF"));
        manifest.write(aos);
        aos.closeArchiveEntry();
View Full Code Here

                archiver.setDestFile(packageFile);
                archiver.setIncludeEmptyDirs(true);
                archiver.addDirectory(libDirectory);

                Manifest manifest = new Manifest();
                manifest.addConfiguredAttribute(new Attribute("Bundle-SymbolicName", project.getArtifactId() + "-" + platform));
                manifest.addConfiguredAttribute(new Attribute("Bundle-Name", name + " for " + platform));
                manifest.addConfiguredAttribute(new Attribute("Bundle-NativeCode", getNativeCodeValue(library)));
                manifest.addConfiguredAttribute(new Attribute("Bundle-Version", project.getVersion()));
                manifest.addConfiguredAttribute(new Attribute("Bundle-ManifestVersion", "2"));
                manifest.addConfiguredAttribute(new Attribute("Bundle-Description", project.getDescription()));
View Full Code Here

                archiver.setIncludeEmptyDirs(true);
                archiver.addDirectory(libDirectory);

                Manifest manifest = new Manifest();
                manifest.addConfiguredAttribute(new Attribute("Bundle-SymbolicName", project.getArtifactId() + "-" + platform));
                manifest.addConfiguredAttribute(new Attribute("Bundle-Name", name + " for " + platform));
                manifest.addConfiguredAttribute(new Attribute("Bundle-NativeCode", getNativeCodeValue(library)));
                manifest.addConfiguredAttribute(new Attribute("Bundle-Version", project.getVersion()));
                manifest.addConfiguredAttribute(new Attribute("Bundle-ManifestVersion", "2"));
                manifest.addConfiguredAttribute(new Attribute("Bundle-Description", project.getDescription()));
                archiver.addConfiguredManifest(manifest);
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.