Package org.apache.maven.archiver

## Class MavenArchiver

- java.lang.Object
- - org.apache.maven.archiver.MavenArchiver

    public class MavenArchiver
    extends java.lang.Object

Version:
  $Revision: 1748306 $ $Date: 2016-06-13 21:33:58 +0200 (Mon, 13 Jun 2016) $
Author:
  Emmanuel Venisse, kama

### Field Summary

Fields
`static java.lang.String` `REPOSITORY_LAYOUT` Repository layout.
`static java.lang.String` `REPOSITORY_LAYOUT_NONUNIQUE` Repository layout non unique.
`static java.lang.String` `SIMPLE_LAYOUT` The simply layout.
`static java.lang.String` `SIMPLE_LAYOUT_NONUNIQUE` simple layout non unique.

### Constructor Summary

Constructors
`MavenArchiver()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `createArchive​(org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, MavenArchiveConfiguration archiveConfiguration)`
`org.codehaus.plexus.archiver.jar.JarArchiver` `getArchiver()`
`org.codehaus.plexus.archiver.jar.Manifest` `getManifest​(org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.project.MavenProject project, ManifestConfiguration config)`
`protected org.codehaus.plexus.archiver.jar.Manifest` `getManifest​(org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, ManifestConfiguration config, java.util.Map<java.lang.String,​java.lang.String> entries)`
`org.codehaus.plexus.archiver.jar.Manifest` `getManifest​(org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, MavenArchiveConfiguration config)`
`org.codehaus.plexus.archiver.jar.Manifest` `getManifest​(org.apache.maven.project.MavenProject project, ManifestConfiguration config)` Return a pre-configured manifest
`void` `setArchiver​(org.codehaus.plexus.archiver.jar.JarArchiver archiver)`
`void` `setOutputFile​(java.io.File outputFile)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### SIMPLE_LAYOUT

    public static final java.lang.String SIMPLE_LAYOUT

The simply layout.

See Also:
  Constant Field Values

#### REPOSITORY_LAYOUT

    public static final java.lang.String REPOSITORY_LAYOUT

Repository layout.

See Also:
  Constant Field Values

#### SIMPLE_LAYOUT_NONUNIQUE

    public static final java.lang.String SIMPLE_LAYOUT_NONUNIQUE

simple layout non unique.

See Also:
  Constant Field Values

#### REPOSITORY_LAYOUT_NONUNIQUE

    public static final java.lang.String REPOSITORY_LAYOUT_NONUNIQUE

Repository layout non unique.

See Also:
  Constant Field Values

### Constructor Detail

#### MavenArchiver

    public MavenArchiver()

### Method Detail

#### getManifest

    public org.codehaus.plexus.archiver.jar.Manifest getManifest​(org.apache.maven.execution.MavenSession session,
                                                                 org.apache.maven.project.MavenProject project,
                                                                 MavenArchiveConfiguration config)
                                                          throws org.codehaus.plexus.archiver.jar.ManifestException,
                                                                 org.apache.maven.artifact.DependencyResolutionRequiredException

Parameters:
  `session` - The Maven Session.
  `project` - The Maven Project.
  `config` - The MavenArchiveConfiguration
Returns:
  The `Manifest`
Throws:
  `org.codehaus.plexus.archiver.jar.ManifestException` - In case of a failure.
  `org.apache.maven.artifact.DependencyResolutionRequiredException` - Resolution failure.

#### getManifest

    public org.codehaus.plexus.archiver.jar.Manifest getManifest​(org.apache.maven.project.MavenProject project,
                                                                 ManifestConfiguration config)
                                                          throws org.codehaus.plexus.archiver.jar.ManifestException,
                                                                 org.apache.maven.artifact.DependencyResolutionRequiredException

Return a pre-configured manifest

Parameters:
  `project` - `MavenProject`
  `config` - `ManifestConfiguration`
Returns:
  `Manifest`
Throws:
  `org.codehaus.plexus.archiver.jar.ManifestException` - Manifest exception.
  `org.apache.maven.artifact.DependencyResolutionRequiredException` - Dependency resolution exception.

#### getManifest

    public org.codehaus.plexus.archiver.jar.Manifest getManifest​(org.apache.maven.execution.MavenSession mavenSession,
                                                                 org.apache.maven.project.MavenProject project,
                                                                 ManifestConfiguration config)
                                                          throws org.codehaus.plexus.archiver.jar.ManifestException,
                                                                 org.apache.maven.artifact.DependencyResolutionRequiredException

Parameters:
  `mavenSession` - `MavenSession`
  `project` - `MavenProject`
  `config` - `ManifestConfiguration`
Returns:
  `Manifest`
Throws:
  `org.codehaus.plexus.archiver.jar.ManifestException` - The manifest exception.
  `org.apache.maven.artifact.DependencyResolutionRequiredException` - The dependency resolution required exception.

#### getManifest

    protected org.codehaus.plexus.archiver.jar.Manifest getManifest​(org.apache.maven.execution.MavenSession session,
                                                                    org.apache.maven.project.MavenProject project,
                                                                    ManifestConfiguration config,
                                                                    java.util.Map<java.lang.String,​java.lang.String> entries)
                                                             throws org.codehaus.plexus.archiver.jar.ManifestException,
                                                                    org.apache.maven.artifact.DependencyResolutionRequiredException

Parameters:
  `session` - `MavenSession`
  `project` - `MavenProject`
  `config` - `ManifestConfiguration`
  `entries` - The entries.
Returns:
  `Manifest`
Throws:
  `org.codehaus.plexus.archiver.jar.ManifestException` - The manifest exception.
  `org.apache.maven.artifact.DependencyResolutionRequiredException` - The dependency resolution required exception.

#### getArchiver

    public org.codehaus.plexus.archiver.jar.JarArchiver getArchiver()

Returns:
  `JarArchiver`

#### setArchiver

    public void setArchiver​(org.codehaus.plexus.archiver.jar.JarArchiver archiver)

Parameters:
  `archiver` - `JarArchiver`

#### setOutputFile

    public void setOutputFile​(java.io.File outputFile)

Parameters:
  `outputFile` - Set output file.

#### createArchive

    public void createArchive​(org.apache.maven.execution.MavenSession session,
                              org.apache.maven.project.MavenProject project,
                              MavenArchiveConfiguration archiveConfiguration)
                       throws org.codehaus.plexus.archiver.jar.ManifestException,
                              java.io.IOException,
                              org.apache.maven.artifact.DependencyResolutionRequiredException

Parameters:
  `session` - `MavenSession`
  `project` - `MavenProject`
  `archiveConfiguration` - `MavenArchiveConfiguration`
Throws:
  `org.codehaus.plexus.archiver.ArchiverException` - Archiver Exception.
  `org.codehaus.plexus.archiver.jar.ManifestException` - Manifest Exception.
  `java.io.IOException` - IO Exception.
  `org.apache.maven.artifact.DependencyResolutionRequiredException` - Dependency resolution exception.