wedge Mojos (org.apache.maven.plugin.assembly.mojo)
wedge Uses:
* AssemblyArchiver
wedge Provides:
* implementation of AssemblyConfigurationSource, for use in assembly components
wedge Notes:
* AssemblyConfigurationSource transports build state given by mojo parameters to deeper assembly components
* AssemblyArchiver abstracts the business of creating the assembly artifact from the mojos
wedge AssemblyArchiver (org.apache.maven.plugin.assembly.archive)
wedge Uses:
* ArchiverManager
* the set of ArchiveAssemblyPhase implementations
* AssemblyDescriptorReader and AssemblyInterpolator
wedge Provides:
wedge logic to discover and read assembly descriptors
* AssemblyDescriptorReader and AssemblyInterpolator help with this task
wedge logic to discover and add filters that merge container descriptor files
* these are implementations of ContainerDescriptorHandler
wedge Notes:
* Archiver instances are retrieved from the ArchiverManager
* Archiver instances are wrapped with AssemblyProxyArchiver, which adds global prefixing, dry-run, and duplicate detection features
* ArchiveAssemblyPhases execute the actual interaction with the (proxied) Archiver instance to produce the assembly
* AssemblyProxyArchiver is the only one initialized as a POJO with the real Archiver component instance passed into the constructor; all other classes used by the AssemblyArchiver are components injected by Plexus
* ArchiveAssemblyPhase instances are injected via a Map which is keyed by their respective role-hints; I don't believe the ordering of keys in this map is deterministic.
* ContainerDescriptorHandler instances are components that are injected via a Map which is keyed by their respective role-hints. Custom implementations can be added via the plugin-level dependency configuration in the pom.xml
wedge ArchiverAssemblyPhase (org.apache.maven.plugin.assembly.archive.phase)
wedge Default Implementations:
* ModuleSetAssemblyPhase
* DependencySetAssemblyPhase
* FileSetAssemblyPhase
* FileItemAssemblyPhase
* RepositoryAssemblyPhase
wedge Uses:
* ArchiverTask implementations, as POJOs
* FileFormatter (FileItemAssemblyPhase)
* RepositoryAssembler (from maven-repository-builder; used by RepositoryAssemblyPhase)
wedge Notes:
* Initialized as Plexus components
* generally, each implementation handles one top-level section of the assembly descriptor
* phases share common logic in terms of how they interact with the Archiver instance; this is captured in different ArchiverTask implementations
wedge ArchiverTask (org.apache.maven.plugin.assembly.archive.task)
wedge Default Implementations:
* AddArtifactTask
* AddDependencySetsTask
* AddDirectoryTask
* AddFileSetsTask
wedge Uses:
* DependencyResolver (AddDependencySetsTask)
* FileSetFormatter (AddFileSetsTask)
wedge Notes:
* Used as POJOs that are initialized then executed by different ArchiverAssemblyPhase instances.
wedge ContainerDescriptorHandler (org.apache.maven.plugin.assembly.filter)
wedge Notes:
* Added to the AssemblyProxyArchiver as a filter and finalizer
* Ability to cherry-pick files before they're added to the assembly archive, and process them (processing usually means aggregation/merging, but could be anything)
* Ability to add a set of "virtual" files to the assembly archive just before it is closed.
* ComponentsXmlArchiveFileFilter (for plexus components.xml files) is always present during the assembly process.
wedge DependencyResolver (org.apache.maven.plugin.assembly.artifact)
wedge Uses:
* ArtifactFactory from maven-artifact
* ArtifactRepository from maven-artifact
* MavenProjectBuilder from maven-project
* ArtifactResolver from maven-artifact
* MavenMetadataSource/ArtifactMetadataSource from maven-project/maven-artifact
wedge Notes:
* Selects the best implementation of ArtifactResolver it can find, based on a String-array of preferential role-hints. If none of the preferred resolvers can be found, it defaults to a lookup without any role-hint. This is necessary for compatibility with maven 2.0.x.
* This component can take a List of remote repositories from the current build, append to this the List of remote repositories from the project passed in (avoiding duplicate entries, based on repository id), and use that as a basis for resolving dependency artifacts
* AssemblyConfigurationSource.isUseTransitiveDependencies() is used in calling components to control whether this component (the resolver) does a full transitive resolution of the project's dependencies, or just resolves the direct dependency artifacts
wedge FileFormatter (org.apache.maven.plugin.assembly.format)
wedge Uses:
* AssemblyFileUtils for line-ending normalization and temp-dir/temp-file management
wedge Provides:
* Interpolation of a given file's contents, based on project values and an optional Properties file or set of filter files (supplied by AssemblyConfigurationSource)
* Normalization of line endings, using values: keep (don't change), dos (\r\n), crlf (\r\n), unix (\n), lf (\n)
wedge Notes:
* If line ending is not 'keep', the final line in the file will always end with a newline string, regardless of whether this is the case in the original file. See MASSEMBLY-96.