Package org.apache.maven.archiver
Class MavenArchiver
- java.lang.Object
-
- org.apache.maven.archiver.MavenArchiver
-
public class MavenArchiver extends java.lang.Object- Version:
- $Revision$ $Date$
- Author:
- Emmanuel Venisse, kama
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREPOSITORY_LAYOUTRepository layout.static java.lang.StringREPOSITORY_LAYOUT_NONUNIQUERepository layout non unique.static java.lang.StringSIMPLE_LAYOUTThe simply layout.static java.lang.StringSIMPLE_LAYOUT_NONUNIQUEsimple layout non unique.
-
Constructor Summary
Constructors Constructor Description MavenArchiver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateArchive(MavenSession session, MavenProject project, MavenArchiveConfiguration archiveConfiguration)JarArchivergetArchiver()ManifestgetManifest(MavenSession mavenSession, MavenProject project, ManifestConfiguration config)protected ManifestgetManifest(MavenSession session, MavenProject project, ManifestConfiguration config, java.util.Map<java.lang.String,java.lang.String> entries)ManifestgetManifest(MavenSession session, MavenProject project, MavenArchiveConfiguration config)ManifestgetManifest(MavenProject project, ManifestConfiguration config)Return a pre-configured manifestvoidsetArchiver(JarArchiver archiver)voidsetOutputFile(java.io.File outputFile)
-
-
-
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
-
-
Method Detail
-
getManifest
public Manifest getManifest(MavenSession session, MavenProject project, MavenArchiveConfiguration config) throws ManifestException, DependencyResolutionRequiredException
- Parameters:
session- The Maven Session.project- The Maven Project.config- The MavenArchiveConfiguration- Returns:
- The
Manifest - Throws:
ManifestException- In case of a failure.DependencyResolutionRequiredException- Resolution failure.
-
getManifest
public Manifest getManifest(MavenProject project, ManifestConfiguration config) throws ManifestException, DependencyResolutionRequiredException
Return a pre-configured manifest- Parameters:
project-MavenProjectconfig-ManifestConfiguration- Returns:
Manifest- Throws:
ManifestException- Manifest exception.DependencyResolutionRequiredException- Dependency resolution exception.
-
getManifest
public Manifest getManifest(MavenSession mavenSession, MavenProject project, ManifestConfiguration config) throws ManifestException, DependencyResolutionRequiredException
- Parameters:
mavenSession-MavenSessionproject-MavenProjectconfig-ManifestConfiguration- Returns:
Manifest- Throws:
ManifestException- The manifest exception.DependencyResolutionRequiredException- The dependency resolution required exception.
-
getManifest
protected Manifest getManifest(MavenSession session, MavenProject project, ManifestConfiguration config, java.util.Map<java.lang.String,java.lang.String> entries) throws ManifestException, DependencyResolutionRequiredException
- Parameters:
session-MavenSessionproject-MavenProjectconfig-ManifestConfigurationentries- The entries.- Returns:
Manifest- Throws:
ManifestException- The manifest exception.DependencyResolutionRequiredException- The dependency resolution required exception.
-
getArchiver
public JarArchiver getArchiver()
- Returns:
JarArchiver
-
setArchiver
public void setArchiver(JarArchiver archiver)
- Parameters:
archiver-JarArchiver
-
setOutputFile
public void setOutputFile(java.io.File outputFile)
- Parameters:
outputFile- Set output file.
-
createArchive
public void createArchive(MavenSession session, MavenProject project, MavenArchiveConfiguration archiveConfiguration) throws ManifestException, java.io.IOException, DependencyResolutionRequiredException
- Parameters:
session-MavenSessionproject-MavenProjectarchiveConfiguration-MavenArchiveConfiguration- Throws:
ArchiverException- Archiver Exception.ManifestException- Manifest Exception.java.io.IOException- IO Exception.DependencyResolutionRequiredException- Dependency resolution exception.
-
-