Package org.codehaus.plexus.archiver.jar

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


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

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

            cmd.createArg().setValue("-jar");
           
            String tmpFilePath = file.getAbsolutePath();
            if (tmpFilePath.contains(" ")) {
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(mainClassName);
            manifest.getMainSection().addConfiguredAttribute(attr);

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

            cmd.createArg().setValue("-jar");
           
            String tmpFilePath = file.getAbsolutePath();
            if (tmpFilePath.contains(" ")) {
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 archiver = new JarArchiver();
        archiver.addDirectory( siteDirectory );
        archiver.setDestFile( siteJar );
        archiver.createArchive();

        return siteJar;
    }
}
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

        File file = fileManager.createTempFile();

        archiver.setDestFile( file );

        archiver.createArchive();

        URL resource = new URL( "jar:file:" + file.getAbsolutePath() + "!/META-INF/MANIFEST.MF" );

        BufferedReader reader = new BufferedReader( new InputStreamReader( resource.openStream() ) );
View Full Code Here

        File file = fileManager.createTempFile();

        archiver.setDestFile( file );

        archiver.createArchive();

        URL resource = new URL( "jar:file:" + file.getAbsolutePath() + "!/META-INF/MANIFEST.MF" );

        BufferedReader reader = new BufferedReader( new InputStreamReader( resource.openStream() ) );
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

            archiver.addDirectory( directory );

            //archiver.setWebxml( new File(directory, "WEB-INF/web.xml"));

            // create archive
            archiver.createArchive();

        }
        catch ( ArchiverException e )
        {
            e.printStackTrace();
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.