org.apache.maven.plugin.assembly.archive
Class DefaultAssemblyArchiver

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver
All Implemented Interfaces:
AssemblyArchiver, LogEnabled, Contextualizable

public class DefaultAssemblyArchiver
extends AbstractLogEnabled
implements AssemblyArchiver, Contextualizable

Controller component designed to organize the many activities involved in creating an assembly archive. This includes locating and configuring Archiver instances, executing multiple AssemblyArchiverPhase instances to interpret the various sections of the assembly descriptor and determine which files to add, and other associated activities.

Version:
$Id: DefaultAssemblyArchiver.java 1072547 2011-02-20 10:31:00Z dennisl $
Plexus component:
role:
"org.apache.maven.plugin.assembly.archive.AssemblyArchiver"

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.assembly.archive.AssemblyArchiver
ROLE
 
Constructor Summary
  DefaultAssemblyArchiver()
           
protected DefaultAssemblyArchiver(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, DependencyResolver resolver, List<AssemblyArchiverPhase> assemblyPhases)
           
 
Method Summary
 void contextualize(Context context)
           
 File createArchive(Assembly assembly, String fullName, String format, AssemblerConfigurationSource configSource)
          Create the assembly archive.
protected  org.codehaus.plexus.archiver.Archiver createArchiver(String format, boolean includeBaseDir, String finalName, AssemblerConfigurationSource configSource, List<ContainerDescriptorHandler> containerHandlers)
          Creates the necessary archiver to build the distribution file.
protected  org.codehaus.plexus.archiver.Archiver createTarArchiver(String format, String tarLongFileMode)
           
protected  org.codehaus.plexus.archiver.Archiver createWarArchiver()
           
protected  void setContainer(PlexusContainer container)
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAssemblyArchiver

public DefaultAssemblyArchiver()

DefaultAssemblyArchiver

protected DefaultAssemblyArchiver(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager,
                                  DependencyResolver resolver,
                                  List<AssemblyArchiverPhase> assemblyPhases)
Method Detail

createArchive

public File createArchive(Assembly assembly,
                          String fullName,
                          String format,
                          AssemblerConfigurationSource configSource)
                   throws ArchiveCreationException,
                          AssemblyFormattingException,
                          InvalidAssemblerConfigurationException
Create the assembly archive. Generally:
  1. Setup any directory structures for temporary files
  2. Calculate the output directory/file for the assembly
  3. Setup any handler components for special descriptor files we may encounter
  4. Lookup and configure the Archiver to be used
  5. Determine what, if any, dependency resolution will be required, and resolve any dependency-version conflicts up front to produce a managed-version map for the whole assembly process.
  6. Iterate through the available AssemblyArchiverPhase instances, executing each to handle a different top-level section of the assembly descriptor, if that section is present.

Specified by:
createArchive in interface AssemblyArchiver
Throws:
ArchiveCreationException
AssemblyFormattingException
InvalidAssemblerConfigurationException

createArchiver

protected org.codehaus.plexus.archiver.Archiver createArchiver(String format,
                                                               boolean includeBaseDir,
                                                               String finalName,
                                                               AssemblerConfigurationSource configSource,
                                                               List<ContainerDescriptorHandler> containerHandlers)
                                                        throws org.codehaus.plexus.archiver.ArchiverException,
                                                               org.codehaus.plexus.archiver.manager.NoSuchArchiverException
Creates the necessary archiver to build the distribution file.

Parameters:
format - Archive format
includeBaseDir -
finalName -
configSource -
containerHandlers -
Returns:
archiver Archiver generated
Throws:
org.codehaus.plexus.archiver.ArchiverException
org.codehaus.plexus.archiver.manager.NoSuchArchiverException

createWarArchiver

protected org.codehaus.plexus.archiver.Archiver createWarArchiver()
                                                           throws org.codehaus.plexus.archiver.manager.NoSuchArchiverException
Throws:
org.codehaus.plexus.archiver.manager.NoSuchArchiverException

createTarArchiver

protected org.codehaus.plexus.archiver.Archiver createTarArchiver(String format,
                                                                  String tarLongFileMode)
                                                           throws org.codehaus.plexus.archiver.manager.NoSuchArchiverException,
                                                                  org.codehaus.plexus.archiver.ArchiverException
Throws:
org.codehaus.plexus.archiver.manager.NoSuchArchiverException
org.codehaus.plexus.archiver.ArchiverException

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

setContainer

protected void setContainer(PlexusContainer container)


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.