Class DefaultAssemblyArchiver
- java.lang.Object
-
- org.apache.maven.plugins.assembly.archive.DefaultAssemblyArchiver
-
- All Implemented Interfaces:
AssemblyArchiver
@Named public class DefaultAssemblyArchiver extends Object implements AssemblyArchiver
Controller component designed to organize the many activities involved in creating an assembly archive. This includes locating and configuringArchiverinstances, executing multiple.archive.phase.AssemblyArchiverPhaseinstances to interpret the various sections of the assembly descriptor and determine which files to add, and other associated activities.
-
-
Constructor Summary
Constructors Constructor Description DefaultAssemblyArchiver(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, List<AssemblyArchiverPhase> assemblyPhases, Map<String,ContainerDescriptorHandler> containerDescriptorHandlers, org.codehaus.plexus.PlexusContainer container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilecreateArchive(Assembly assembly, String fullName, String format, AssemblerConfigurationSource configSource, boolean recompressZippedFiles, String mergeManifestMode, Date outputTimestamp)Create the assembly archive.protected org.codehaus.plexus.archiver.ArchivercreateArchiver(String format, boolean includeBaseDir, String finalName, AssemblerConfigurationSource configSource, List<ContainerDescriptorHandler> containerHandlers, boolean recompressZippedFiles, String mergeManifestMode, Date outputTimestamp)Creates the necessary archiver to build the distribution file.protected org.codehaus.plexus.archiver.ArchivercreateTarArchiver(String format, org.codehaus.plexus.archiver.tar.TarLongFileMode tarLongFileMode)protected org.codehaus.plexus.archiver.ArchivercreateWarArchiver()
-
-
-
Constructor Detail
-
DefaultAssemblyArchiver
@Inject public DefaultAssemblyArchiver(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, List<AssemblyArchiverPhase> assemblyPhases, Map<String,ContainerDescriptorHandler> containerDescriptorHandlers, org.codehaus.plexus.PlexusContainer container)
-
-
Method Detail
-
createArchive
public File createArchive(Assembly assembly, String fullName, String format, AssemblerConfigurationSource configSource, boolean recompressZippedFiles, String mergeManifestMode, Date outputTimestamp) throws ArchiveCreationException, AssemblyFormattingException, InvalidAssemblerConfigurationException
Create the assembly archive. Generally:- Setup any directory structures for temporary files
- Calculate the output directory/file for the assembly
- Setup any handler components for special descriptor files we may encounter
- Lookup and configure the
Archiverto be used - 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.
- Iterate through the available
AssemblyArchiverPhaseinstances, executing each to handle a different top-level section of the assembly descriptor, if that section is present.
- Specified by:
createArchivein interfaceAssemblyArchiver- Parameters:
assembly- TheAssemblyfullName- The full name.format- The format.configSource- TheAssemblerConfigurationSourcerecompressZippedFiles- recompress zipped files.mergeManifestMode- How to handle already existing Manifest files (skip, merge, mergewithoutmain)outputTimestamp- Timestamp for reproducible archive entries- Returns:
- The resulting archive file.
- Throws:
ArchiveCreationException- when creation failsAssemblyFormattingException- when formatting failsInvalidAssemblerConfigurationException- when the configuration is bad
-
createArchiver
protected org.codehaus.plexus.archiver.Archiver createArchiver(String format, boolean includeBaseDir, String finalName, AssemblerConfigurationSource configSource, List<ContainerDescriptorHandler> containerHandlers, boolean recompressZippedFiles, String mergeManifestMode, Date outputTimestamp) throws org.codehaus.plexus.archiver.manager.NoSuchArchiverException
Creates the necessary archiver to build the distribution file.- Parameters:
format- Archive formatincludeBaseDir- the base directory for include.finalName- The final name.configSource-AssemblerConfigurationSourcecontainerHandlers- The list ofContainerDescriptorHandlerrecompressZippedFiles- recompress zipped files.mergeManifestMode- how to handle already existing Manifest files- Returns:
- archiver Archiver generated
- Throws:
org.codehaus.plexus.archiver.ArchiverExceptionorg.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, org.codehaus.plexus.archiver.tar.TarLongFileMode tarLongFileMode) throws org.codehaus.plexus.archiver.manager.NoSuchArchiverException
- Throws:
org.codehaus.plexus.archiver.manager.NoSuchArchiverException
-
-