Package org.apache.maven.archiver

Examples of org.apache.maven.archiver.MavenArchiver.createArchive()


            if (resourcesDir.isDirectory()) {
                archiver.getArchiver().addDirectory(resourcesDir);
            }

            archiver.createArchive(project, configuration);

            return archiveFile;
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to create kar archive", e);
        }
View Full Code Here


           
            if (classpath != null) {
                archive.addManifestEntry("Class-Path", getClassPath());
            }

            archiver.createArchive(project, archive);

            return archiveFile;
        }
        catch (Exception e) {
            throw new MojoExecutionException("Failed to create archive", e);
View Full Code Here

      archiver.setArchiver(jarArchiver);
      archiver.setOutputFile(installerFile);
      jarArchiver.addDirectory(workDirectory);

      // create archive
      archiver.createArchive(getProject(), archive);

    } catch (ArchiverException e) {
      throw new JbiPluginException("Error creating service unit: "
          + e.getMessage(), e);
    } catch (ManifestException e) {
View Full Code Here

      if (jbiSourceDirectory.isDirectory()) {
        jarArchiver.addDirectory(jbiSourceDirectory, null,
            DirectoryScanner.DEFAULTEXCLUDES);
      }
      // create archive
      archiver.createArchive(getProject(), archive);

    } catch (ArchiverException e) {
      throw new JbiPluginException("Error creating assembly: "
          + e.getMessage(), e);
    } catch (ManifestException e) {
View Full Code Here

            addFile( archiver, new File( basedir, "project.properties" ) );
            addFile( archiver, new File( basedir, "build.properties" ) );
            addFile( archiver, new File( basedir, "project.xml" ) );
            addDirectory( archiver, new File( basedir, "src/plugin-resources" ) );

            archiver.createArchive( project, new MavenArchiveConfiguration() );

            return jarFile;
        }
        catch ( Exception e )
        {
View Full Code Here

            getLog().debug( "Excluding " + Arrays.asList( getPackagingExcludes() ) + " from the generated EAR." );
            getLog().debug( "Including " + Arrays.asList( getPackagingIncludes() ) + " in the generated EAR." );

            archiver.getArchiver().addDirectory( getWorkDirectory(), getPackagingIncludes(), getPackagingExcludes() );
            archiver.createArchive( session, getProject(), archive );

            if ( classifier != null )
            {
                projectHelper.attachArtifact( getProject(), "ear", classifier, earFile );
            }
View Full Code Here

                archiver.setOutputFile( outputFile );
   
                archive.setAddMavenDescriptor( false );
                archive.setForced( forceCreation );
   
                archiver.createArchive( project, archive );
            }
            catch ( IOException e )
            {
                throw new MojoExecutionException( "Error creating source archive: " + e.getMessage(), e );
            }
View Full Code Here

        else
        {
            archiver.getArchiver().addDirectory( siteDirectory, getArchiveIncludes(), getArchiveExcludes() );
        }

        archiver.createArchive( project, archive );

        return siteJar;
    }

    private String[] getArchiveIncludes()
View Full Code Here

           
            if (classpath != null) {
                archive.addManifestEntry("Class-Path", getClassPath());
            }

            archiver.createArchive(project, archive);

            return archiveFile;
        }
        catch (Exception e) {
            throw new MojoExecutionException("Failed to create archive", e);
View Full Code Here

            "Adding existing MANIFEST to archive. Found under: "
                + existingManifest.getPath());
        archive.setManifestFile(existingManifest);
      }

      archiver.createArchive(project, archive);

      return jarFile;
    } catch (Exception e) {
      // TODO: improve error handling
      throw new MojoExecutionException("Error assembling JAR", e);
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.