Package org.codehaus.plexus.archiver.jar

Examples of org.codehaus.plexus.archiver.jar.JarArchiver.createArchive()


            attr.setName("Main-Class");
            attr.setValue(cls.getName());
            manifest.getMainSection().addConfiguredAttribute(attr);

            jar.addConfiguredManifest(manifest);
            jar.createArchive();
           
            cmd.createArg().setValue("-jar");
            cmd.createArg().setValue(file.getAbsolutePath());

           
View Full Code Here


            attr.setName("Main-Class");
            attr.setValue(mainClassName);
            manifest.getMainSection().addConfiguredAttribute(attr);

            jar.addConfiguredManifest(manifest);
            jar.createArchive();

            cmd.createArg().setValue("-jar");
            cmd.createArg().setValue(file.getAbsolutePath());

        } catch (Exception e1) {
View Full Code Here

                JarArchiver jarArchiver = new JarArchiver();

                jarArchiver.setDestFile( tempJarFile );
                jarArchiver.addDirectory( getFile() );
                jarArchiver.setManifest( getManifestFile() );
                jarArchiver.createArchive();

                return tempJarFile;
            }
            catch ( ArchiverException e )
            {
View Full Code Here

            attr.setName("Main-Class");
            attr.setValue(mainClassName);
            manifest.getMainSection().addConfiguredAttribute(attr);

            jar.addConfiguredManifest(manifest);
            jar.createArchive();

            cmd.createArg().setValue("-jar");
            cmd.createArg().setValue(file.getAbsolutePath());

        } catch (Exception e1) {
View Full Code Here

                JarArchiver jarArchiver = new JarArchiver();

                jarArchiver.setDestFile( tempJarFile );
                jarArchiver.addDirectory( getFile() );
                jarArchiver.setManifest( getManifestFile() );
                jarArchiver.createArchive();

                return tempJarFile;
            }
            catch ( ArchiverException e )
            {
View Full Code Here

            attr.setName("Main-Class");
            attr.setValue(cls.getName());
            manifest.getMainSection().addConfiguredAttribute(attr);

            jar.addConfiguredManifest(manifest);
            jar.createArchive();
           
            cmd.createArg().setValue("-jar");
            cmd.createArg().setValue(file.getAbsolutePath());

           
View Full Code Here

                JarArchiver jarArchiver = new JarArchiver();

                jarArchiver.setDestFile(tempJarFile);
                jarArchiver.addDirectory(getFile());
                jarArchiver.setManifest(getManifestFile());
                jarArchiver.createArchive();

                return tempJarFile;
            } catch (ArchiverException e) {
                // TODO only accepts the cause as parameter in JDK 1.6+
                throw new IOException(e.getMessage());
View Full Code Here

            JarArchiver archiver = new JarArchiver();
            archiver.enableLogging( new ConsoleLogger( Logger.LEVEL_ERROR, "archiver" ) );
            archiver.setDestFile( jarFile );
            archiver.addFile( pluginXmlFile, pluginXml );
            archiver.createArchive();

            artifactCtl = MockControl.createControl( Artifact.class );
            Artifact artifact = (Artifact) artifactCtl.getMock();

            artifact.getFile();
View Full Code Here

            attr.setName("Main-Class");
            attr.setValue(mainClassName);
            manifest.getMainSection().addConfiguredAttribute(attr);

            jar.addConfiguredManifest(manifest);
            jar.createArchive();

            cmd.createArg().setValue("-jar");
            cmd.createArg().setValue(file.getAbsolutePath());

        } catch (Exception e1) {
View Full Code Here

            attr.setName("Main-Class");
            attr.setValue(cls.getName());
            manifest.getMainSection().addConfiguredAttribute(attr);

            jar.addConfiguredManifest(manifest);
            jar.createArchive();
           
            cmd.createArg().setValue("-jar");
            cmd.createArg().setValue(file.getAbsolutePath());

           
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.