Class Assembly
java.lang.Object
org.apache.maven.plugins.assembly.model.Assembly
- All Implemented Interfaces:
- Serializable
An assembly defines a collection of files usually
 distributed in an
         archive format such as zip, tar, or tar.gz that is
 generated from a
         project.  For example, a project could produce a ZIP
 assembly which
         contains a project's JAR artifact in the root directory,
 the
         runtime dependencies in a lib/ directory, and a shell
 script to launch
         a stand-alone application.
- Version:
- $Revision$ $Date$
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddComponentDescriptor(String string) Method addComponentDescriptor.voidaddContainerDescriptorHandler(ContainerDescriptorHandlerConfig containerDescriptorHandlerConfig) Method addContainerDescriptorHandler.voidaddDependencySet(DependencySet dependencySet) Method addDependencySet.voidMethod addFile.voidaddFileSet(FileSet fileSet) Method addFileSet.voidMethod addFormat.voidaddModuleSet(ModuleSet moduleSet) Method addModuleSet.Get sets the base directory of the resulting assembly archive.Method getComponentDescriptors.Method getContainerDescriptorHandlers.Method getDependencySets.getFiles()Method getFiles.Method getFileSets.Method getFormats.getId()Get sets the id of this assembly.Get the modelEncoding field.Method getModuleSets.booleanGet includes a base directory in the final archive.booleanGet includes a site directory in the final archive.voidremoveComponentDescriptor(String string) Method removeComponentDescriptor.voidremoveContainerDescriptorHandler(ContainerDescriptorHandlerConfig containerDescriptorHandlerConfig) Method removeContainerDescriptorHandler.voidremoveDependencySet(DependencySet dependencySet) Method removeDependencySet.voidremoveFile(FileItem fileItem) Method removeFile.voidremoveFileSet(FileSet fileSet) Method removeFileSet.voidremoveFormat(String string) Method removeFormat.voidremoveModuleSet(ModuleSet moduleSet) Method removeModuleSet.voidsetBaseDirectory(String baseDirectory) Set sets the base directory of the resulting assembly archive.voidsetComponentDescriptors(List<String> componentDescriptors) Set specifies the shared components xml file locations to include in the assembly.voidsetContainerDescriptorHandlers(List<ContainerDescriptorHandlerConfig> containerDescriptorHandlers) Set set of components which filter various container descriptors out of the normal archive stream, so they can be aggregated then added.voidsetDependencySets(List<DependencySet> dependencySets) Set specifies which dependencies to include in the assembly.voidSet specifies which single files to include in the assembly.voidsetFileSets(List<FileSet> fileSets) Set specifies which groups of files to include in the assembly.voidsetFormats(List<String> formats) Set specifies the formats of the assembly.voidSet sets the id of this assembly.voidsetIncludeBaseDirectory(boolean includeBaseDirectory) Set includes a base directory in the final archive.voidsetIncludeSiteDirectory(boolean includeSiteDirectory) Set includes a site directory in the final archive.voidsetModelEncoding(String modelEncoding) Set the modelEncoding field.voidsetModuleSets(List<ModuleSet> moduleSets) Set specifies which module files to include in the assembly.
- 
Constructor Details- 
Assemblypublic Assembly()
 
- 
- 
Method Details- 
addComponentDescriptorMethod addComponentDescriptor.- Parameters:
- string- a string object.
 
- 
addContainerDescriptorHandlerpublic void addContainerDescriptorHandler(ContainerDescriptorHandlerConfig containerDescriptorHandlerConfig) Method addContainerDescriptorHandler.- Parameters:
- containerDescriptorHandlerConfig- a containerDescriptorHandlerConfig object.
 
- 
addDependencySetMethod addDependencySet.- Parameters:
- dependencySet- a dependencySet object.
 
- 
addFileMethod addFile.- Parameters:
- fileItem- a fileItem object.
 
- 
addFileSetMethod addFileSet.- Parameters:
- fileSet- a fileSet object.
 
- 
addFormatMethod addFormat.- Parameters:
- string- a string object.
 
- 
addModuleSetMethod addModuleSet.- Parameters:
- moduleSet- a moduleSet object.
 
- 
getBaseDirectoryGet sets the base directory of the resulting assembly archive. If this is not set and includeBaseDirectory == true, ${project.build.finalName} will be used instead. (Since 2.2-beta-1).- Returns:
- String
 
- 
getComponentDescriptorsMethod getComponentDescriptors.- Returns:
- List
 
- 
getContainerDescriptorHandlersMethod getContainerDescriptorHandlers.- Returns:
- List
 
- 
getDependencySetsMethod getDependencySets.- Returns:
- List
 
- 
getFileSetsMethod getFileSets.- Returns:
- List
 
- 
getFilesMethod getFiles.- Returns:
- List
 
- 
getFormatsMethod getFormats.- Returns:
- List
 
- 
getIdGet sets the id of this assembly. This is a symbolic name for a particular assembly of files from this project. Also, aside from being used to distinctly name the assembled package by attaching its value to the generated archive, the id is used as your artifact's classifier when deploying.- Returns:
- String
 
- 
getModelEncodingGet the modelEncoding field.- Returns:
- String
 
- 
getModuleSetsMethod getModuleSets.- Returns:
- List
 
- 
isIncludeBaseDirectorypublic boolean isIncludeBaseDirectory()Get includes a base directory in the final archive. For example, if you are creating an assembly named "your-app", setting includeBaseDirectory to true will create an archive that includes this base directory. If this option is set to false the archive created will unzip its content to the current directory.- Returns:
- boolean
 
- 
isIncludeSiteDirectorypublic boolean isIncludeSiteDirectory()Get includes a site directory in the final archive. The site directory location of a project is determined by the siteDirectory parameter of the Assembly Plugin.- Returns:
- boolean
 
- 
removeComponentDescriptorMethod removeComponentDescriptor.- Parameters:
- string- a string object.
 
- 
removeContainerDescriptorHandlerpublic void removeContainerDescriptorHandler(ContainerDescriptorHandlerConfig containerDescriptorHandlerConfig) Method removeContainerDescriptorHandler.- Parameters:
- containerDescriptorHandlerConfig- a containerDescriptorHandlerConfig object.
 
- 
removeDependencySetMethod removeDependencySet.- Parameters:
- dependencySet- a dependencySet object.
 
- 
removeFileMethod removeFile.- Parameters:
- fileItem- a fileItem object.
 
- 
removeFileSetMethod removeFileSet.- Parameters:
- fileSet- a fileSet object.
 
- 
removeFormatMethod removeFormat.- Parameters:
- string- a string object.
 
- 
removeModuleSetMethod removeModuleSet.- Parameters:
- moduleSet- a moduleSet object.
 
- 
setBaseDirectorySet sets the base directory of the resulting assembly archive. If this is not set and includeBaseDirectory == true, ${project.build.finalName} will be used instead. (Since 2.2-beta-1).- Parameters:
- baseDirectory- a baseDirectory object.
 
- 
setComponentDescriptorsSet specifies the shared components xml file locations to include in the assembly. The locations specified must be relative to the base location of the descriptor. If the descriptor was found via a <descriptorRef/> element in the classpath, any components it specifies will also be found on the classpath. If it is found by pathname via a <descriptor/> element the value here will be interpreted as a path relative to the project basedir. When multiple componentDescriptors are found, their contents are merged. Check out the descriptor components for more information. A componentDescriptor is specified by providing one or more of <componentDescriptor> subelements.- Parameters:
- componentDescriptors- a componentDescriptors object.
 
- 
setContainerDescriptorHandlerspublic void setContainerDescriptorHandlers(List<ContainerDescriptorHandlerConfig> containerDescriptorHandlers) Set set of components which filter various container descriptors out of the normal archive stream, so they can be aggregated then added.- Parameters:
- containerDescriptorHandlers- a containerDescriptorHandlers object.
 
- 
setDependencySetsSet specifies which dependencies to include in the assembly. A dependencySet is specified by providing one or more of <dependencySet> subelements.- Parameters:
- dependencySets- a dependencySets object.
 
- 
setFileSetsSet specifies which groups of files to include in the assembly. A fileSet is specified by providing one or more of <fileSet> subelements.- Parameters:
- fileSets- a fileSets object.
 
- 
setFilesSet specifies which single files to include in the assembly. A file is specified by providing one or more of <file> subelements.- Parameters:
- files- a files object.
 
- 
setFormatsSet specifies the formats of the assembly. It is often better to specify the formats via the goal parameter rather than here. For example, that allows different profiles to generate different types of archives. Multiple formats can be supplied and the Assembly Plugin will generate an archive for each of the desired formats. When deploying your project, all file formats specified will also be deployed. A format is specified by supplying one of the following values in a <format> subelement:- "zip" - Creates a ZIP file format
- "tar" - Creates a TAR format
- "tar.gz" or "tgz" - Creates a gzip'd TAR format
- "tar.bz2" or "tbz2" - Creates a bzip'd TAR format
- "tar.snappy" - Creates a snappy'd TAR format
- "tar.xz" or "txz" - Creates a xz'd TAR format
- "tar.zst" or "tzst" - Creates a zst'd TAR format
- "jar" - Creates a JAR format
- "dir" - Creates an exploded directory format
- "war" - Creates a WAR format
 - Parameters:
- formats- a formats object.
 
- 
setIdSet sets the id of this assembly. This is a symbolic name for a particular assembly of files from this project. Also, aside from being used to distinctly name the assembled package by attaching its value to the generated archive, the id is used as your artifact's classifier when deploying.- Parameters:
- id- a id object.
 
- 
setIncludeBaseDirectorypublic void setIncludeBaseDirectory(boolean includeBaseDirectory) Set includes a base directory in the final archive. For example, if you are creating an assembly named "your-app", setting includeBaseDirectory to true will create an archive that includes this base directory. If this option is set to false the archive created will unzip its content to the current directory.- Parameters:
- includeBaseDirectory- a includeBaseDirectory object.
 
- 
setIncludeSiteDirectorypublic void setIncludeSiteDirectory(boolean includeSiteDirectory) Set includes a site directory in the final archive. The site directory location of a project is determined by the siteDirectory parameter of the Assembly Plugin.- Parameters:
- includeSiteDirectory- a includeSiteDirectory object.
 
- 
setModelEncodingSet the modelEncoding field.- Parameters:
- modelEncoding- a modelEncoding object.
 
- 
setModuleSetsSet specifies which module files to include in the assembly. A moduleSet is specified by providing one or more of <moduleSet> subelements.- Parameters:
- moduleSets- a moduleSets object.
 
 
-