Package org.apache.maven.archiver

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


                        unpackDirectory,
                        includes.getPatterns(),
                        excludes.getPatterns());
            }

            archiver.createArchive(project, archive);
        }
        catch (Exception e) {
            throw new MojoExecutionException("Error assembling JAR", 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

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

    } catch (Exception e) {
      throw new JbiPluginException("Error creating shared library: "
          + e.getMessage(), 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

        try
        {
            // we don't want Maven stuff
            archive.setAddMavenDescriptor( false );
            archiver.createArchive( session, project, archive );
        }
        catch ( ManifestException e )
        {
            throw new ArchiverException( "ManifestException: " + e.getMessage(), 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.setOutputFile(warFile);
        warArchiver.addDirectory(getWebappDirectory(), getIncludes(), getExcludes());
        warArchiver.setWebxml(new File(getWebappDirectory(), "WEB-INF/web.xml"));

        // create archive
        archiver.createArchive(getProject(), archive);
        getProject().getArtifact().setFile(warFile);
    }

}
View Full Code Here

            }

            // Add the context of original jar excluding resources that we just added base on GWT descriptors
            jarArchiver.addArchivedFileSet( origJarFile, null, jarExcludes.toArray( new String[jarExcludes.size()] ) );

            archiver.createArchive( getProject(), archive );
        }
        catch ( Exception e )
        {
            throw new MojoExecutionException( "Error assembling JAR", e );
        }
View Full Code Here

            if (!archive.isForced()) {
                // optimized archive creation not supported for now because of build qualifier mismatch issues, see TYCHO-502
                getLog().warn("ignoring unsupported archive forced = false parameter.");
                archive.setForced(true);
            }
            archiver.createArchive(project, archive);
        } catch (IOException e) {
            throw new MojoExecutionException("Error creating source archive: " + e.getMessage(), e);
        } catch (ArchiverException e) {
            throw new MojoExecutionException("Error creating source archive: " + e.getMessage(), e);
        } catch (DependencyResolutionRequiredException 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.