org.apache.maven.plugin.assembly.model
Class Assembly

java.lang.Object
  extended by org.apache.maven.plugin.assembly.model.Assembly
All Implemented Interfaces:
java.io.Serializable

public class Assembly
extends java.lang.Object
implements java.io.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:
Serialized Form

Constructor Summary
Assembly()
           
 
Method Summary
 void addComponentDescriptor(java.lang.String string)
          Method addComponentDescriptor
 void addDependencySet(DependencySet dependencySet)
          Method addDependencySet
 void addFile(FileItem fileItem)
          Method addFile
 void addFileSet(FileSet fileSet)
          Method addFileSet
 void addFormat(java.lang.String string)
          Method addFormat
 void addModuleSet(ModuleSet moduleSet)
          Method addModuleSet
 void addRepository(Repository repository)
          Method addRepository
 java.lang.String getBaseDirectory()
          Get Sets the base directory of the resulting assembly archive.
 java.util.List getComponentDescriptors()
          Method getComponentDescriptors
 java.util.List getDependencySets()
          Method getDependencySets
 java.util.List getFiles()
          Method getFiles
 java.util.List getFileSets()
          Method getFileSets
 java.util.List getFormats()
          Method getFormats
 java.lang.String getId()
          Get Sets the id of this assembly.
 java.lang.String getModelEncoding()
           
 java.util.List getModuleSets()
          Method getModuleSets
 java.util.List getRepositories()
          Method getRepositories
 boolean isIncludeBaseDirectory()
          Get Includes a base directory in the final archive.
 boolean isIncludeSiteDirectory()
          Get Includes a site directory in the final archive.
 void removeComponentDescriptor(java.lang.String string)
          Method removeComponentDescriptor
 void removeDependencySet(DependencySet dependencySet)
          Method removeDependencySet
 void removeFile(FileItem fileItem)
          Method removeFile
 void removeFileSet(FileSet fileSet)
          Method removeFileSet
 void removeFormat(java.lang.String string)
          Method removeFormat
 void removeModuleSet(ModuleSet moduleSet)
          Method removeModuleSet
 void removeRepository(Repository repository)
          Method removeRepository
 void setBaseDirectory(java.lang.String baseDirectory)
          Set Sets the base directory of the resulting assembly archive.
 void setComponentDescriptors(java.util.List componentDescriptors)
          Set Specifies the shared components xml file locations to include in the assembly.
 void setDependencySets(java.util.List dependencySets)
          Set Specifies which dependencies to include in the assembly.
 void setFiles(java.util.List files)
          Set Specifies which single files to include in the assembly.
 void setFileSets(java.util.List fileSets)
          Set Specifies which groups of files to include in the assembly.
 void setFormats(java.util.List formats)
          Set Specifies the formats of the assembly.
 void setId(java.lang.String id)
          Set Sets the id of this assembly.
 void setIncludeBaseDirectory(boolean includeBaseDirectory)
          Set Includes a base directory in the final archive.
 void setIncludeSiteDirectory(boolean includeSiteDirectory)
          Set Includes a site directory in the final archive.
 void setModelEncoding(java.lang.String modelEncoding)
           
 void setModuleSets(java.util.List moduleSets)
          Set Specifies which module files to include in the assembly.
 void setRepositories(java.util.List repositories)
          Set Specifies which repository files to include in the assembly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assembly

public Assembly()
Method Detail

addComponentDescriptor

public void addComponentDescriptor(java.lang.String string)
Method addComponentDescriptor

Parameters:
string -

addDependencySet

public void addDependencySet(DependencySet dependencySet)
Method addDependencySet

Parameters:
dependencySet -

addFile

public void addFile(FileItem fileItem)
Method addFile

Parameters:
fileItem -

addFileSet

public void addFileSet(FileSet fileSet)
Method addFileSet

Parameters:
fileSet -

addFormat

public void addFormat(java.lang.String string)
Method addFormat

Parameters:
string -

addModuleSet

public void addModuleSet(ModuleSet moduleSet)
Method addModuleSet

Parameters:
moduleSet -

addRepository

public void addRepository(Repository repository)
Method addRepository

Parameters:
repository -

getBaseDirectory

public java.lang.String getBaseDirectory()
Get 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)


getComponentDescriptors

public java.util.List getComponentDescriptors()
Method getComponentDescriptors


getDependencySets

public java.util.List getDependencySets()
Method getDependencySets


getFileSets

public java.util.List getFileSets()
Method getFileSets


getFiles

public java.util.List getFiles()
Method getFiles


getFormats

public java.util.List getFormats()
Method getFormats


getId

public java.lang.String getId()
Get 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.


getModuleSets

public java.util.List getModuleSets()
Method getModuleSets


getRepositories

public java.util.List getRepositories()
Method getRepositories


isIncludeBaseDirectory

public 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. Default value is true.


isIncludeSiteDirectory

public 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. Default value is false.


removeComponentDescriptor

public void removeComponentDescriptor(java.lang.String string)
Method removeComponentDescriptor

Parameters:
string -

removeDependencySet

public void removeDependencySet(DependencySet dependencySet)
Method removeDependencySet

Parameters:
dependencySet -

removeFile

public void removeFile(FileItem fileItem)
Method removeFile

Parameters:
fileItem -

removeFileSet

public void removeFileSet(FileSet fileSet)
Method removeFileSet

Parameters:
fileSet -

removeFormat

public void removeFormat(java.lang.String string)
Method removeFormat

Parameters:
string -

removeModuleSet

public void removeModuleSet(ModuleSet moduleSet)
Method removeModuleSet

Parameters:
moduleSet -

removeRepository

public void removeRepository(Repository repository)
Method removeRepository

Parameters:
repository -

setBaseDirectory

public void setBaseDirectory(java.lang.String baseDirectory)
Set 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)

Parameters:
baseDirectory -

setComponentDescriptors

public void setComponentDescriptors(java.util.List componentDescriptors)
Set Specifies the shared components xml file locations to include in the assembly. The locations specified must be relative to the basedir of the project. 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 -

setDependencySets

public void setDependencySets(java.util.List dependencySets)
Set Specifies which dependencies to include in the assembly. A dependencySet is specified by providing one or more of <dependencySet> subelements.

Parameters:
dependencySets -

setFileSets

public void setFileSets(java.util.List fileSets)
Set Specifies which groups of files to include in the assembly. A fileSet is specified by providing one or more of <fileSet> subelements.

Parameters:
fileSets -

setFiles

public void setFiles(java.util.List files)
Set Specifies which single files to include in the assembly. A file is specified by providing one or more of <file> subelements.

Parameters:
files -

setFormats

public void setFormats(java.util.List formats)
Set Specifies the formats of the assembly. Multiple formats can be supplied and the Assembly Plugin will generate an archive for each 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:

Parameters:
formats -

setId

public void setId(java.lang.String id)
Set 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 -

setIncludeBaseDirectory

public 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. Default value is true.

Parameters:
includeBaseDirectory -

setIncludeSiteDirectory

public 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. Default value is false.

Parameters:
includeSiteDirectory -

setModuleSets

public void setModuleSets(java.util.List moduleSets)
Set Specifies which module files to include in the assembly. A moduleSet is specified by providing one or more of <moduleSet> subelements.

Parameters:
moduleSets -

setRepositories

public void setRepositories(java.util.List repositories)
Set Specifies which repository files to include in the assembly. A repository is specified by providing one or more of <repository> subelements.

Parameters:
repositories -

setModelEncoding

public void setModelEncoding(java.lang.String modelEncoding)

getModelEncoding

public java.lang.String getModelEncoding()


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.