Package org.codehaus.plexus.archiver.jar

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


    // jar the result
    try {
      JarArchiver archiver = new JarArchiver();
      archiver.addDirectory(releaseDirectory, new String[]{"*/**"}, new String[]{});
      archiver.setDestFile(new File(dojoDirectory, RELEASE_DIR + ".jar"));
      archiver.createArchive();
    } catch (Exception e) {
      log.error("Failed to archive dojo build", e);
      throw new MojoExecutionException("Failed to archive dojo build");
    }
  }
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(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

            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

        }

        JarArchiver archiver = new JarArchiver();
        archiver.addDirectory( siteDirectory );
        archiver.setDestFile( siteJar );
        archiver.createArchive();

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

            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");
            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.