### Example Property File
Source: https://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
A property file contains variable names and their corresponding string values for substitution. Lines starting with '#' are treated as comments.
```properties
# lines beginning with the # sign are comments
variable1=value1
variable2=value2
```
--------------------------------
### Assembly Configuration Example
Source: https://maven.apache.org/plugins/maven-assembly-plugin/assembly.html
Example of an assembly descriptor configuration within a Maven project. This snippet shows basic elements like dependencySets and componentDescriptors.
```xml
```
--------------------------------
### Assembly Descriptor with Custom Handlers
Source: https://maven.apache.org/plugins/maven-assembly-plugin/examples/single/using-container-descriptor-handlers.html
This example demonstrates an assembly descriptor that includes both a `test.xml` and a `test.properties` file. The `test.properties` file is configured to be processed by a handler that recognizes comments starting with '#'.
```xml
example
zip
src/main/resources
test.xml
test.properties
true
```
--------------------------------
### Example Shared Assembly Descriptor XML
Source: https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html
An example of an assembly descriptor file (`myassembly.xml`) that can be shared. It defines the format and file sets to be included in the assembly.
```xml
my-assembly-descriptor-id
jar
pom.xml
true
src
true
```
--------------------------------
### Component Configuration Example
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiver.html
Illustrates the configuration of a component using an XML configuration, an expression evaluator, and a container realm.
```java
final Object component,
final Xpp3Dom config,
final AssemblerConfigurationSource configSource) throws ComponentLookupException,
ComponentConfigurationException {
final ConfigurationListener listener = new DebugConfigurationListener(LOGGER);
final ExpressionEvaluator expressionEvaluator = new AssemblyExpressionEvaluator(configSource);
final XmlPlexusConfiguration configuration = new XmlPlexusConfiguration(config);
configurator.configureComponent(
component, configuration, expressionEvaluator, container.getContainerRealm(), listener);
}
```
--------------------------------
### Output File Name Mapping Example
Source: https://maven.apache.org/plugins/maven-assembly-plugin/faq.html
Demonstrates how to use system properties, environment variables, and artifact attributes to define the output file name for the assembly.
```xml
${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}
```
--------------------------------
### Example Project Structure with Custom Handlers
Source: https://maven.apache.org/plugins/maven-assembly-plugin/examples/single/using-container-descriptor-handlers.html
This snippet shows a basic Maven project structure that includes dependencies and plugin configurations, relevant to setting up custom assembly descriptor handlers. Ensure your project has the necessary dependencies and plugin configurations for assembly tasks.
```xml
4.0.0
org.apache.maven.plugins.assembly
maven-assembly-plugin-example
0.0.1-SNAPSHOT
org.apache.maven.plugins
maven-assembly-plugin
3.7.0-SNAPSHOT
org.apache.maven.plugins
maven-assembly-plugin
3.7.0-SNAPSHOT
src/main/assembly/assembly.xml
```
--------------------------------
### Example Assembly Artifact Name
Source: https://maven.apache.org/plugins/maven-assembly-plugin/usage.html
An example of the naming convention for an assembly artifact created by the plugin. The artifact classifier, such as 'jar-with-dependencies', is embedded in the filename.
```text
target/sample-1.0-SNAPSHOT-jar-with-dependencies.jar
```
--------------------------------
### Mocking and Setting Up Dependencies for AddDependencySetsTask
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref-test/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.html
This snippet demonstrates the setup of mock objects and artifacts required to test the AddDependencySetsTask. It includes mocking Artifact, ArtifactHandler, ProjectBuilder, MavenSession, and AssemblerConfigurationSource to simulate dependencies and assembly configurations.
```java
final File file = new File("dep-artifact.jar");
Artifact depArtifact = mock(Artifact.class);
when(depArtifact.getGroupId()).thenReturn("GROUPID");
when(depArtifact.getArtifactId()).thenReturn(aid);
when(depArtifact.getBaseVersion()).thenReturn(version);
when(depArtifact.getFile()).thenReturn(file);
ArtifactHandler artifactHandler = mock(ArtifactHandler.class);
when(artifactHandler.getExtension()).thenReturn(type);
when(depArtifact.getArtifactHandler()).thenReturn(artifactHandler);
final File destFile = new File("assembly-dep-set.zip");
final Archiver archiver = mock(Archiver.class);
when(archiver.getDestFile()).thenReturn(destFile);
when(archiver.getOverrideDirectoryMode()).thenReturn(0222);
when(archiver.getOverrideFileMode()).thenReturn(0222);
final ProjectBuilder projectBuilder = mock(ProjectBuilder.class);
when(projectBuilder.build(any(Artifact.class), any(ProjectBuildingRequest.class)))
.thenThrow(pbe);
final MavenSession session = mock(MavenSession.class);
when(session.getProjectBuildingRequest()).thenReturn(new DefaultProjectBuildingRequest());
when(session.getUserProperties()).thenReturn(new Properties());
when(session.getSystemProperties()).thenReturn(new Properties());
final AssemblerConfigurationSource configSource = mock(AssemblerConfigurationSource.class);
when(configSource.getFinalName()).thenReturn("final-name");
when(configSource.getMavenSession()).thenReturn(session);
when(configSource.getProject()).thenReturn(project);
final DependencySet ds = new DependencySet();
ds.setOutputDirectory("/out");
DefaultAssemblyArchiverTest.setupInterpolators(configSource, project);
final AddDependencySetsTask task = new AddDependencySetsTask(
Collections.singletonList(ds), Collections.singleton(depArtifact), project, projectBuilder);
task.addDependencySet(ds, archiver, configSource);
```
--------------------------------
### Mocking and Setting Up Dependencies for AddDependencySetsTask
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref-test/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.html
This Java code snippet demonstrates the setup and mocking required to test the AddDependencySetsTask. It involves creating mock objects for Maven artifacts, project builders, and assembly configurations to simulate a real Maven environment for testing purposes.
```java
Artifact mainArtifact = mock(Artifact.class);
mainProject.setArtifact(mainArtifact);
final Model depModel = new Model();
depModel.setArtifactId(depAid);
depModel.setGroupId(depGid);
depModel.setVersion(depVer);
depModel.setPackaging(depExt);
final MavenProject depProject = new MavenProject(depModel);
Artifact depArtifact = mock(Artifact.class);
ArtifactHandler artifactHandler = mock(ArtifactHandler.class);
when(artifactHandler.getExtension()).thenReturn(depExt);
when(depArtifact.getArtifactHandler()).thenReturn(artifactHandler);
final File newFile = File.createTempFile("junit", null, temporaryFolder);
when(depArtifact.getFile()).thenReturn(newFile);
when(depArtifact.getGroupId()).thenReturn("GROUPID");
depProject.setArtifact(depArtifact);
ProjectBuildingResult pbr = mock(ProjectBuildingResult.class);
when(pbr.getProject()).thenReturn(depProject);
final ProjectBuilder projectBuilder = mock(ProjectBuilder.class);
when(projectBuilder.build(any(Artifact.class), any(ProjectBuildingRequest.class)))
.thenReturn(pbr);
final MavenSession session = mock(MavenSession.class);
when(session.getProjectBuildingRequest()).thenReturn( new DefaultProjectBuildingRequest());
when(session.getUserProperties()).thenReturn( new Properties());
when(session.getSystemProperties()).thenReturn( new Properties());
final AssemblerConfigurationSource configSource = mock(AssemblerConfigurationSource.class);
when(configSource.getFinalName()).thenReturn(mainAid + "-" + mainVer);
when(configSource.getProject()).thenReturn(mainProject);
when(configSource.getMavenSession()).thenReturn(session);
final Archiver archiver = mock(Archiver.class);
when(archiver.getDestFile()).thenReturn( new File("junk"));
when(archiver.getOverrideDirectoryMode()).thenReturn(0222);
when(archiver.getOverrideFileMode()).thenReturn(0222);
DefaultAssemblyArchiverTest.setupInterpolators(configSource, mainProject);
final AddDependencySetsTask task = new AddDependencySetsTask(
Collections.singletonList(ds), Collections.singleton(depArtifact), depProject, projectBuilder);
task.addDependencySet(ds, archiver, configSource);
```
--------------------------------
### Example Dependency Declaration
Source: https://maven.apache.org/plugins/maven-assembly-plugin/examples/single/including-and-excluding-artifacts.html
This snippet shows a typical dependency declaration in a Maven pom.xml file, specifying a binary zip artifact to be included in the assembly.
```xml
YOUR GROUP
YOUR ARTIFACT
YOUR VERSION
bin
zip
```
--------------------------------
### createArchive
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/archive/AssemblyArchiver.html
Creates the assembly archive by processing the assembly descriptor and configuration. This method orchestrates the setup of temporary directories, output file calculation, handler configuration, archiver lookup, dependency resolution, and execution of various assembly archiver phases.
```APIDOC
## createArchive
### Description
Creates the assembly archive by processing the assembly descriptor and configuration. This method orchestrates the setup of temporary directories, output file calculation, handler configuration, archiver lookup, dependency resolution, and execution of various assembly archiver phases.
### Method
`createArchive`
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
None
### Parameters
* **assembly** (Assembly) - Required - The {@link Assembly} descriptor.
* **fullName** (String) - Required - The full name for the archive.
* **format** (String) - Required - The format of the archive (e.g., 'zip', 'tar.gz').
* **configSource** (AssemblerConfigurationSource) - Required - The configuration source for the assembler.
* **sourceDateEpoch** (FileTime) - Required - Timestamp for reproducible archive entries.
### Response
#### Success Response (200)
* **File** (File) - The resulting archive file.
### Exceptions
* ArchiveCreationException - Thrown when the archive creation fails.
* AssemblyFormattingException - Thrown when formatting fails.
* InvalidAssemblerConfigurationException - Thrown when the assembler configuration is invalid.
```
--------------------------------
### Manifest File Entry for Executable JAR
Source: https://maven.apache.org/plugins/maven-assembly-plugin/usage.html
An example of the 'META-INF/MANIFEST.MF' file content when the 'Main-Class' attribute is configured for an executable JAR. This entry allows the JAR to be executed using the '-jar' JVM switch.
```text
[...]
Main-Class: org.sample.App
```
--------------------------------
### Add Dependency Set with Unpacking
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref-test/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.html
This snippet demonstrates the setup and execution of adding a dependency set to an archiver, specifically when unpacking is enabled. It involves mocking various Maven components and verifying interactions with the archiver.
```java
Artifact artifact = mock(Artifact.class);
final File artifactFile = File.createTempFile("junit", null, temporaryFolder);
when(artifact.getFile()).thenReturn(artifactFile);
when(artifact.getGroupId()).thenReturn("GROUPID");
final Archiver archiver = mock(Archiver.class);
when(archiver.getDestFile()).thenReturn(new File("junk"));
when(archiver.getOverrideDirectoryMode()).thenReturn(0222);
when(archiver.getOverrideFileMode()).thenReturn(0222);
if (!unpack) {
when(configSource.getProject()).thenReturn(project);
}
final MavenProject depProject = new MavenProject(new Model());
depProject.setGroupId("GROUPID");
ProjectBuildingResult pbr = mock(ProjectBuildingResult.class);
when(pbr.getProject()).thenReturn(depProject);
final ProjectBuilder projectBuilder = mock(ProjectBuilder.class);
when(projectBuilder.build(any(Artifact.class), any(ProjectBuildingRequest.class)))
.thenReturn(pbr);
final AddDependencySetsTask task = new AddDependencySetsTask(
Collections.singletonList(ds), Collections.singleton(artifact), project, projectBuilder);
DefaultAssemblyArchiverTest.setupInterpolators(configSource, project);
task.addDependencySet(ds, archiver, configSource);
_// result of easymock migration, should be assert of expected result instead of verifying methodcalls_
verify(configSource).getFinalName();
verify(configSource, atLeastOnce()).getMavenSession();
verify(archiver, atLeastOnce()).getDestFile();
verify(archiver).getOverrideDirectoryMode();
verify(archiver).getOverrideFileMode();
verify(archiver).setFileMode(10);
verify(archiver).setFileMode(146);
verify(archiver).setDirectoryMode(10);
verify(archiver).setDirectoryMode(146);
verify(session).getProjectBuildingRequest();
verify(session, atLeastOnce()).getUserProperties();
verify(session, atLeastOnce()).getSystemProperties();
verify(projectBuilder).build(any(Artifact.class), any(ProjectBuildingRequest.class));
if (unpack) {
verify(archiver).addArchivedFileSet(any(ArchivedFileSet.class), isNull());
} else {
verify(archiver).addFile(artifactFile, outputLocation + "/artifact", 10);
verify(configSource, atLeastOnce()).getProject();
}
```
--------------------------------
### execute()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Executes the assembly process to create the binary distribution. This is the main entry point for the mojo's functionality.
```APIDOC
## execute()
### Description
Creates the binary distribution.
### Method
`void`
### Endpoint
N/A (Mojo execution)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
Void. The result is the creation of the distribution artifact.
#### Response Example
N/A
```
--------------------------------
### DefaultFileInfo Get Name
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the name of the file.
```java
@Override
public String getName() {
return inputFile.getName();
}
```
--------------------------------
### DefaultFileInfo Get Contents
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the input stream for the file contents.
```java
@Override
public InputStream getContents() throws IOException {
return Files.newInputStream(inputFile.toPath());
}
```
--------------------------------
### Get Last Modified Date (Deprecated)
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the last modified date of the archive. This method is deprecated.
```java
@Override
@Deprecated
public Date getLastModifiedDate() {
return delegate.getLastModifiedDate();
}
```
--------------------------------
### execute
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Executes the assembly process to create the binary distribution.
```APIDOC
## execute
### Description
Create the binary distribution.
### Method
public void execute()
### Throws
* org.apache.maven.plugin.MojoExecutionException
* org.apache.maven.plugin.MojoFailureException
```
--------------------------------
### Configure Delimiters for Resource Filtering
Source: https://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html
This example demonstrates how to specify custom delimiters for filtering expressions within resources. It shows how to define both default delimiters like '${*}' and single-character delimiters like '@'.
```xml
${*}
@
```
--------------------------------
### Create Maven Project
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref-test/org/apache/maven/plugins/assembly/artifact/DefaultDependencyResolverTest.html
Creates a MavenProject instance with a basic POM model and sets its artifact details. Used for setting up test environments.
```java
private MavenProject createMavenProject(
final String groupId, final String artifactId, final String version, final File basedir) {
final Model model = new Model();
model.setGroupId(groupId);
model.setArtifactId(artifactId);
model.setVersion(version);
model.setPackaging("pom");
final MavenProject project = new MavenProject(model);
final Artifact pomArtifact = newArtifact(groupId, artifactId, version);
project.setArtifact(pomArtifact);
project.setArtifacts(new HashSet<>());
project.setDependencyArtifacts(new HashSet<>());
project.setFile(new File(basedir, "pom.xml"));
return project;
}
```
--------------------------------
### Create Distributions with Maven Assembly Plugin
Source: https://maven.apache.org/plugins/maven-assembly-plugin/examples/single/using-components.html
Execute this command to generate distributions using the configured assembly plugin.
```bash
mvn assembly:single
```
--------------------------------
### Verify PGP Signature with PGP
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/guides/download.html
Use PGP to import the KEYS file and verify the downloaded file's PGP signature.
```bash
% pgp -ka KEYS
% pgp downloaded_file.asc
```
--------------------------------
### getModelEncoding()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/index-all.html
Gets the model encoding.
```APIDOC
## getModelEncoding()
### Description
Gets the model encoding.
### Method
Method
### Class
- org.apache.maven.plugins.assembly.model.Assembly
- org.apache.maven.plugins.assembly.model.Component
```
--------------------------------
### getId()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/index-all.html
Gets the ID of this assembly.
```APIDOC
## getId()
### Description
Gets the ID of this assembly.
### Method
Method
### Class
- org.apache.maven.plugins.assembly.model.Assembly
```
--------------------------------
### Including Site Directory in Assembly
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/io/DefaultAssemblyReader.html
Adds the site directory to the assembly, ensuring it exists and is configured correctly. Throws an exception if the site directory does not exist.
```java
final File siteDirectory = configSource.getSiteDirectory();
if (!siteDirectory.exists()) {
throw new InvalidAssemblerConfigurationException("site did not exist in the target directory - "
+ "please run site:site before creating the assembly");
}
LOGGER.info("Adding site directory to assembly : " + siteDirectory);
final FileSet siteFileSet = new FileSet();
siteFileSet.setDirectory(siteDirectory.getPath());
siteFileSet.setOutputDirectory("/site");
assembly.addFileSet(siteFileSet);
```
--------------------------------
### getFiles
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets all files added to the archive.
```APIDOC
## getFiles
### Description
Retrieves a map of all files that have been added to the archive.
### Method
`Map getFiles()`
```
--------------------------------
### AddDirectoryTask Constructors
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/task/AddDirectoryTask.html
Provides details on how to create an instance of AddDirectoryTask.
```APIDOC
## AddDirectoryTask Constructor
### Description
Constructs an AddDirectoryTask with a specified directory.
### Signature
`AddDirectoryTask(File directory)`
## AddDirectoryTask Constructor
### Description
Constructs an AddDirectoryTask with a specified directory and input stream transformers.
### Signature
`AddDirectoryTask(File directory, org.codehaus.plexus.components.io.functions.InputStreamTransformer transformers)`
```
--------------------------------
### getDestFile
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the destination file for the archive.
```APIDOC
## getDestFile
### Description
Retrieves the destination file where the archive will be created.
### Method
`File getDestFile()`
```
--------------------------------
### getDefaultFileMode
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the default file mode.
```APIDOC
## getDefaultFileMode
### Description
Retrieves the default file mode for files.
### Method
`int getDefaultFileMode()`
```
--------------------------------
### Include Buildable Project Directory for Selected Modules
Source: https://maven.apache.org/plugins/maven-assembly-plugin/advanced-module-set-topics.html
This snippet includes an entire buildable project directory for each selected module. It's useful for allowing users to tinker with and build the project themselves. Excludes the 'target' directory.
```xml
[...]
[...]
[...]
target/**
```
--------------------------------
### Verify PGP Signature with GPG
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/guides/download.html
Use GPG to import the KEYS file and verify the downloaded file's PGP signature.
```bash
% gpg --import KEYS
% gpg --verify downloaded_file.asc downloaded_file
```
--------------------------------
### getDefaultDirectoryMode
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the default directory mode.
```APIDOC
## getDefaultDirectoryMode
### Description
Retrieves the default file mode for directories.
### Method
`int getDefaultDirectoryMode()`
```
--------------------------------
### Verify PGP Signature with PGPk
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/guides/download.html
Use PGPk to add the KEYS file and verify the downloaded file's PGP signature.
```bash
% pgpk -a KEYS
% pgpv downloaded_file.asc
```
--------------------------------
### getEnvInterpolator
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.html
Gets an interpolator for environment variables.
```APIDOC
## getEnvInterpolator
### Description
Gets an interpolator configured from environment variables.
### Method
org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator getEnvInterpolator()
### Returns
- org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator: The environment variables interpolator.
```
--------------------------------
### getCommandLinePropsInterpolator
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.html
Gets an interpolator for command-line properties.
```APIDOC
## getCommandLinePropsInterpolator
### Description
Gets an interpolator configured from environment variables and other command-line properties.
### Method
org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator getCommandLinePropsInterpolator()
### Returns
- org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator: The command-line properties interpolator.
```
--------------------------------
### AddDirectoryTask Configuration Methods
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/index-all.html
Methods for configuring the AddDirectoryTask, specifically for includes.
```APIDOC
## AddDirectoryTask Configuration Methods
### Description
Methods for configuring the AddDirectoryTask, specifically for includes.
### Methods
- **setIncludes(List)**: Method in class org.apache.maven.plugins.assembly.archive.task.AddDirectoryTask
```
--------------------------------
### getRepositoryInterpolator
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.html
Gets the interpolator for repository-related properties.
```APIDOC
## getRepositoryInterpolator
### Description
Gets the interpolator used for resolving repository-related properties.
### Method
org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator getRepositoryInterpolator()
### Returns
- org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator: The repository interpolator.
```
--------------------------------
### AssemblyProxyArchiver Constructor
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Constructs a new AssemblyProxyArchiver with specified configuration.
```APIDOC
## Constructor AssemblyProxyArchiver
### Description
Initializes a new instance of the `AssemblyProxyArchiver` class.
### Parameters
* **rootPrefix** (String) - The root prefix for the archive.
* **delegate** (org.codehaus.plexus.archiver.Archiver) - The underlying archiver delegate.
* **containerDescriptorHandlers** (List) - A list of container descriptor handlers.
* **extraSelectors** (List) - A list of extra file selectors.
* **extraFinalizers** (List) - A list of extra archive finalizers.
* **assemblyWorkDir** (File) - The working directory for assembly operations.
```
--------------------------------
### getSiteDirectory()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets the directory designated for site-related files.
```APIDOC
## getSiteDirectory()
### Description
Gets the site directory.
### Method
`File`
### Endpoint
N/A (Mojo configuration)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`File` - The site directory.
#### Response Example
N/A
```
--------------------------------
### getDuplicateBehavior
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the duplicate behavior setting for the archiver.
```APIDOC
## getDuplicateBehavior
### Description
Gets the behavior to apply when duplicate files are encountered during archiving.
### Method
String
### Returns
The duplicate behavior setting (e.g., ADD, FAIL, SKIP, PRESERVE).
```
--------------------------------
### createArchive
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/AssemblyArchiver.html
Creates an assembly archive based on the provided assembly configuration, output details, and source date epoch.
```APIDOC
## createArchive
### Description
Creates an assembly archive. This process involves setting up temporary directories, calculating output locations, configuring handlers for special descriptor files, looking up and configuring the appropriate `Archiver`, resolving dependency versions, and executing various assembly archiver phases.
### Method
`File createArchive(Assembly assembly, String fullName, String format, AssemblerConfigurationSource configSource, FileTime sourceDateEpoch)`
### Parameters
#### Path Parameters
- **assembly** (Assembly) - Description not specified.
- **fullName** (String) - The full name of the archive to be created.
- **format** (String) - The format of the archive (e.g., 'zip', 'tar.gz').
- **configSource** (AssemblerConfigurationSource) - The configuration source for the assembler.
- **sourceDateEpoch** (FileTime) - Timestamp for reproducible archive entries.
#### Query Parameters
None specified.
#### Request Body
None specified.
### Request Example
None specified.
### Response
#### Success Response (200)
- **File** (File) - The resulting archive file.
#### Response Example
None specified.
### Throws
- `ArchiveCreationException` - when creation fails.
- `AssemblyFormattingException` - when formatting fails.
- `InvalidAssemblerConfigurationException` - when the configuration is bad.
```
--------------------------------
### getMainProjectInterpolator
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.html
Gets the interpolator for main project properties.
```APIDOC
## getMainProjectInterpolator
### Description
Gets the interpolator used for resolving main project properties.
### Method
org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator getMainProjectInterpolator()
### Returns
- org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator: The main project interpolator.
```
--------------------------------
### Assembly Constructor
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/Assembly.html
Initializes a new instance of the Assembly class.
```APIDOC
## Assembly()
### Description
Initializes a new instance of the Assembly class.
### Method
public
### Constructor
Assembly()
```
--------------------------------
### getWorkingDirectory()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets the current working directory for the Maven build.
```APIDOC
## getWorkingDirectory()
### Description
Gets the working directory.
### Method
`File`
### Endpoint
N/A (Mojo configuration)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`File` - The working directory.
#### Response Example
N/A
```
--------------------------------
### ModuleBinaries Configuration Methods
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/index-all.html
Methods for configuring module binaries, including dependency inclusion and artifact includes.
```APIDOC
## ModuleBinaries Configuration Methods
### Description
Methods for configuring module binaries, including dependency inclusion and artifact includes.
### Methods
- **setIncludeDependencies(boolean)**: Method in class org.apache.maven.plugins.assembly.model.ModuleBinaries
Set if set to true, the plugin will include the direct and transitive dependencies of of the project modules included here.
- **setIncludes(List)**: Method in class org.apache.maven.plugins.assembly.model.ModuleBinaries
Set when subelements are present, they define a set of artifact coordinates to include.
```
--------------------------------
### getOutputDirectory()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets the directory where the final assembly artifact should be placed.
```APIDOC
## getOutputDirectory()
### Description
Gets the output directory for the assembly artifact.
### Method
`File`
### Endpoint
N/A (Mojo configuration)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`File` - The output directory.
#### Response Example
N/A
```
--------------------------------
### Setting Up DependencySet for Testing
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref-test/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.html
This snippet illustrates the configuration of a DependencySet object for testing purposes. It sets the output directory, file name mapping, unpack flag, scope, and directory/file modes, which are crucial for defining how dependencies are added to the assembly.
```java
final MavenProject project = new MavenProject(new Model());
final DependencySet ds = new DependencySet();
ds.setOutputDirectory(outputLocation);
ds.setOutputFileNameMapping("artifact");
ds.setUnpack(unpack);
ds.setScope(Artifact.SCOPE_COMPILE);
ds.setDirectoryMode(Integer.toString(10, 8));
ds.setFileMode(Integer.toString(10, 8));
final MavenSession session = mock(MavenSession.class);
when(session.getProjectBuildingRequest()).thenReturn(new DefaultProjectBuildingRequest());
when(session.getUserProperties()).thenReturn(new Properties());
when(session.getSystemProperties()).thenReturn(new Properties());
final AssemblerConfigurationSource configSource = mock(AssemblerConfigurationSource.class);
when(configSource.getMavenSession()).thenReturn(session);
when(configSource.getFinalName()).thenReturn("final-name");
```
--------------------------------
### getBasedir()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets the base directory of the project for which the assembly is being created.
```APIDOC
## getBasedir()
### Description
Gets the base directory of the project.
### Method
`File`
### Endpoint
N/A (Mojo configuration)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`File` - The base directory of the project.
#### Response Example
N/A
```
--------------------------------
### Model Encoding
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/Component.html
Methods for getting and setting the model encoding.
```APIDOC
## Model Encoding
### Description
Methods for retrieving and setting the model encoding.
### getModelEncoding
#### Method
public String getModelEncoding()
#### Returns
String - The model encoding.
### setModelEncoding
#### Method
public void setModelEncoding(String modelEncoding)
#### Parameters
- **modelEncoding** (String) - Required - The model encoding value.
```
--------------------------------
### getLastModifiedTime
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the last modified time for the archive entries.
```APIDOC
## getLastModifiedTime
### Description
Gets the last modified time that will be applied to entries in the archive.
### Method
FileTime
### Returns
The FileTime object representing the last modified time.
```
--------------------------------
### Assembly Configuration Methods
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/Assembly.html
This section details the various methods available to configure an assembly, allowing users to specify component descriptors, dependency sets, file sets, individual files, archive formats, and more.
```APIDOC
## Assembly Configuration Methods
### Description
This section details the various methods available to configure an assembly, allowing users to specify component descriptors, dependency sets, file sets, individual files, archive formats, and more.
### Methods
- **setComponentDescriptors**
- **Description**: Specifies shared component XML file locations to include in the assembly. These locations are relative to the descriptor's base location. Multiple component descriptors are merged.
- **Parameters**:
- `componentDescriptors` (List) - A list of component descriptor file paths.
- **setContainerDescriptorHandlers**
- **Description**: Sets a collection of components that filter container descriptors from the archive stream for aggregation.
- **Parameters**:
- `containerDescriptorHandlers` (List) - A list of container descriptor handler configurations.
- **setDependencySets**
- **Description**: Specifies which dependencies to include in the assembly. Each dependency set is defined by one or more `` subelements.
- **Parameters**:
- `dependencySets` (List) - A list of dependency set configurations.
- **setFileSets**
- **Description**: Specifies which groups of files to include in the assembly. Each file set is defined by one or more `` subelements.
- **Parameters**:
- `fileSets` (List) - A list of file set configurations.
- **setFiles**
- **Description**: Specifies individual files to include in the assembly. Each file is defined by one or more `` subelements.
- **Parameters**:
- `files` (List) - A list of file configurations.
- **setFormats**
- **Description**: Specifies the desired formats for the assembly archive. Multiple formats can be supplied, and an archive will be generated for each. Supported formats include zip, tar, tar.gz, jar, dir, war, and others.
- **Parameters**:
- `formats` (List) - A list of desired archive formats (e.g., "zip", "tar.gz").
- **setId**
- **Description**: Sets the ID of the assembly, used as a symbolic name and as the artifact classifier during deployment.
- **Parameters**:
- `id` (String) - The ID for the assembly.
- **setIncludeBaseDirectory**
- **Description**: Determines whether to include a base directory in the final archive. If true, the archive will contain a top-level directory. If false, contents are unzipped to the current directory.
- **Parameters**:
- `includeBaseDirectory` (boolean) - Whether to include the base directory.
- **setIncludeSiteDirectory**
- **Description**: Determines whether to include the project's site directory in the final archive.
- **Parameters**:
- `includeSiteDirectory` (boolean) - Whether to include the site directory.
- **setModelEncoding**
- **Description**: Sets the encoding for the assembly model.
- **Parameters**:
- `modelEncoding` (String) - The model encoding value.
- **setModuleSets**
- **Description**: Specifies module sets to include in the assembly.
- **Parameters**:
- `moduleSets` (List) - A list of module set configurations.
```
--------------------------------
### getRepositoryInterpolator()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets an interpolator for resolving properties related to artifact repositories.
```APIDOC
## getRepositoryInterpolator()
### Description
Gets an interpolator for repository properties.
### Method
`org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator`
### Endpoint
N/A (Internal utility)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator` - The interpolator instance.
#### Response Example
N/A
```
--------------------------------
### getMainProjectInterpolator()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets an interpolator that resolves properties from the main project context.
```APIDOC
## getMainProjectInterpolator()
### Description
Gets an interpolator for the main project context.
### Method
`org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator`
### Endpoint
N/A (Internal utility)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator` - The interpolator instance.
#### Response Example
N/A
```
--------------------------------
### FileSet Constructor
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/FileSet.html
Initializes a new instance of the FileSet class.
```APIDOC
## Constructor FileSet
### Description
Initializes a new instance of the FileSet class.
### Method
public FileSet()
### Endpoint
N/A (Constructor)
```
--------------------------------
### getInlineDescriptors()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets assembly descriptors that are defined inline within the POM.
```APIDOC
## getInlineDescriptors()
### Description
Gets inline assembly descriptors.
### Method
`List`
### Endpoint
N/A (Mojo configuration)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`List` - A list of inline assembly descriptor objects.
#### Response Example
N/A
```
--------------------------------
### Execute Maven Package Phase
Source: https://maven.apache.org/plugins/maven-assembly-plugin/usage.html
Execute the normal 'package' phase to create the project assembly. This command triggers the configured assembly build.
```bash
mvn package
```
--------------------------------
### getFilters()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets a list of filter properties files to be used during interpolation.
```APIDOC
## getFilters()
### Description
Gets a list of filter properties files.
### Method
`List`
### Endpoint
N/A (Mojo configuration)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`List` - A list of paths to filter properties files.
#### Response Example
N/A
```
--------------------------------
### Component Constructor
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/Component.html
Initializes a new instance of the Component class.
```APIDOC
## Component Constructor
### Description
Initializes a new instance of the Component class.
### Method
public Component()
### Endpoint
N/A (Constructor)
```
--------------------------------
### getHandlerName()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/index-all.html
Gets the handler's plexus role-hint for lookup from the container.
```APIDOC
## getHandlerName()
### Description
Gets the handler's plexus role-hint for lookup from the container.
### Method
Method
### Class
- org.apache.maven.plugins.assembly.model.ContainerDescriptorHandlerConfig
```
--------------------------------
### Creating FileSet for Module Project
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/archive/phase/ModuleSetAssemblyPhase.html
Creates a FileSet instance for a given module project, resolving the source directory and applying includes, excludes, and output directory configurations. It handles absolute and relative paths and integrates module-specific interpolators.
```java
FileSet createFileSet(
final FileSet fileSet,
final ModuleSources sources,
final MavenProject moduleProject,
final AssemblerConfigurationSource configSource)
throws AssemblyFormattingException {
final FileSet fs = new FileSet();
String sourcePath = fileSet.getDirectory();
final File moduleBasedir = moduleProject.getBasedir();
if (sourcePath != null) {
final File sourceDir = new File(sourcePath);
if (!AssemblyFileUtils.isAbsolutePath(sourceDir)) {
sourcePath = new File(moduleBasedir, sourcePath).getAbsolutePath();
}
} else {
sourcePath = moduleBasedir.getAbsolutePath();
}
fs.setDirectory(sourcePath);
fs.setDirectoryMode(fileSet.getDirectoryMode());
final List excludes = new ArrayList<>();
final List originalExcludes = fileSet.getExcludes();
if ((originalExcludes != null) && !originalExcludes.isEmpty()) {
excludes.addAll(originalExcludes);
}
if (sources.isExcludeSubModuleDirectories()) {
final List modules = moduleProject.getModules();
for (final String moduleSubPath : modules) {
excludes.add(moduleSubPath + "/**");
}
}
fs.setExcludes(excludes);
fs.setFiltered(fileSet.isFiltered());
fs.setFileMode(fileSet.getFileMode());
fs.setIncludes(fileSet.getIncludes());
fs.setLineEnding(fileSet.getLineEnding());
FixedStringSearchInterpolator moduleProjectInterpolator =
AssemblyFormatUtils.moduleProjectInterpolator(moduleProject);
FixedStringSearchInterpolator artifactProjectInterpolator =
AssemblyFormatUtils.artifactProjectInterpolator(moduleProject);
String destPathPrefix = "";
if (sources.isIncludeModuleDirectory()) {
destPathPrefix = AssemblyFormatUtils.evaluateFileNameMapping(
sources.getOutputDirectoryMapping(),
moduleProject.getArtifact(),
configSource.getProject(),
moduleProject.getArtifact(),
configSource,
moduleProjectInterpolator,
artifactProjectInterpolator);
if (!destPathPrefix.endsWith("/")) {
destPathPrefix += "/";
}
}
String destPath = fileSet.getOutputDirectory();
if (destPath == null) {
destPath = destPathPrefix;
} else {
destPath = destPathPrefix + destPath;
}
destPath = AssemblyFormatUtils.getOutputDirectory(
destPath,
configSource.getFinalName(),
configSource,
moduleProjectInterpolator,
```
--------------------------------
### getOutputFileNameMapping
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/ModuleBinaries.html
Gets the file name mapping pattern for non-unpacked dependencies.
```APIDOC
## getOutputFileNameMapping
### Description
Gets the file name mapping pattern for non-unpacked dependencies included in this assembly. Default is ${module.artifactId}-${module.version}${dashClassifier?}.${module.extension}. (Since 2.2-beta-2).
### Method
public String getOutputFileNameMapping()
### Returns
- **String** - The file name mapping pattern.
```
--------------------------------
### select
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/functions/MavenProjects.html
Selects Maven projects from a source based on packaging type and optional inclusion/exclusion criteria.
```APIDOC
## select
### Description
Selects Maven projects from a source collection based on a specified packaging type. It can optionally filter projects further using inclusion and exclusion consumers.
### Method
static void
### Signature
select(Iterable source, String packagingType, MavenProjectConsumer consumer)
select(Iterable source, String packagingType, MavenProjectConsumer include, MavenProjectConsumer excluded)
### Parameters
* **source** (Iterable) - The collection of Maven projects to select from.
* **packagingType** (String) - The packaging type to filter by.
* **consumer** (MavenProjectConsumer) - A consumer to process the selected projects (in the single consumer overload).
* **include** (MavenProjectConsumer) - A consumer to process projects that match the criteria.
* **excluded** (MavenProjectConsumer) - A consumer to process projects that do not match the criteria (used in the overload with both include and excluded).
```
--------------------------------
### getDirectoryMode
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/ModuleBinaries.html
Gets the directory mode (UNIX-style permissions) for included directories.
```APIDOC
## getDirectoryMode
### Description
Gets the directory mode (UNIX-style permissions) for included directories. This is an octal value. The default value is 0755.
### Method
public String getDirectoryMode()
### Returns
- **String** - The directory mode as a string (e.g., "0755").
```
--------------------------------
### Create New Folder Utility
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref-test/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.html
Utility method to create a new directory structure. It joins subdirectories with '/' and attempts to create them using mkdirs().
```java
private static File newFolder(File root, String... subDirs) throws IOException {
String subFolder = String.join("/", subDirs);
File result = new File(root, subFolder);
if (!result.mkdirs()) {
throw new IOException("Couldn't create folders " + root);
}
return result;
}
```
--------------------------------
### AssemblyFormatUtils - Getting Distribution Name
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/class-use/Assembly.html
Retrieves the full distribution name from an Assembly.
```APIDOC
## getDistributionName(Assembly assembly, AssemblerConfigurationSource configSource)
### Description
Calculates and returns the full distribution artifact name based on the Assembly configuration and source.
### Method
`static String`
### Endpoint
N/A (Method Signature)
### Parameters
- **assembly** (Assembly) - Description: The Assembly object.
- **configSource** (AssemblerConfigurationSource) - Description: The configuration source for the assembler.
### Response
#### Success Response (String)
- **String** - The full distribution name.
### Response Example
```json
{
"example": "my-distribution-1.0"
}
```
```
--------------------------------
### getOverrideFileMode
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the override file mode. This method is part of the Archiver interface.
```APIDOC
## getOverrideFileMode
### Description
Retrieves the override mode for files.
### Method
public int getOverrideFileMode()
### Returns
An integer representing the override file mode.
```
--------------------------------
### ModuleSetAssemblyPhase Implementation
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/archive/phase/ModuleSetAssemblyPhase.html
This snippet shows the implementation of the ModuleSetAssemblyPhase, including setting the output directory and returning the file set.
```java
fs.setOutputDirectory(destPath);
LOGGER.debug("module source directory is: " + sourcePath);
LOGGER.debug("module dest directory is: " + destPath + " (assembly basedir may be prepended)");
return fs;
}
```
--------------------------------
### getOverrideDirectoryMode
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the override directory mode. This method is part of the Archiver interface.
```APIDOC
## getOverrideDirectoryMode
### Description
Retrieves the override mode for directories.
### Method
public int getOverrideDirectoryMode()
### Returns
An integer representing the override directory mode.
```
--------------------------------
### AssemblyXpp3Writer Constructor
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/io/xpp3/AssemblyXpp3Writer.html
Initializes a new instance of the AssemblyXpp3Writer class.
```APIDOC
## AssemblyXpp3Writer()
### Description
Initializes a new instance of the AssemblyXpp3Writer class.
### Constructor
`public AssemblyXpp3Writer()`
```
--------------------------------
### getFileMode
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the default file mode. This method is part of the Archiver interface.
```APIDOC
## getFileMode
### Description
Retrieves the default file mode for files.
### Method
public int getFileMode()
### Returns
An integer representing the default file mode.
```
--------------------------------
### order Method
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/phase/DependencySetAssemblyPhase.html
Returns the order of this phase in the assembly process.
```APIDOC
## order()
### Description
Returns the order of this phase in the assembly process.
### Method
public int
### Specified by
`order` in interface `PhaseOrder`
```
--------------------------------
### getDirectoryMode
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the default directory mode. This method is part of the Archiver interface.
```APIDOC
## getDirectoryMode
### Description
Retrieves the default file mode for directories.
### Method
public int getDirectoryMode()
### Returns
An integer representing the default directory mode.
```
--------------------------------
### getDuplicateBehavior
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Gets the duplicate behavior setting. This method is part of the Archiver interface.
```APIDOC
## getDuplicateBehavior
### Description
Retrieves the current setting for how duplicate files are handled.
### Method
public String getDuplicateBehavior()
### Returns
A string representing the duplicate behavior (e.g., "fail", "overwrite", "skip").
```
--------------------------------
### ComponentXpp3Reader Constructors
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/io/xpp3/ComponentXpp3Reader.html
Provides details on how to instantiate the ComponentXpp3Reader, with and without a custom ContentTransformer.
```APIDOC
## ComponentXpp3Reader()
### Description
Default constructor for ComponentXpp3Reader.
### Constructor
`ComponentXpp3Reader()`
## ComponentXpp3Reader(ComponentXpp3Reader.ContentTransformer contentTransformer)
### Description
Constructor for ComponentXpp3Reader that accepts a custom ContentTransformer.
### Constructor
`ComponentXpp3Reader(ComponentXpp3Reader.ContentTransformer contentTransformer)`
### Parameters
* `contentTransformer` (ComponentXpp3Reader.ContentTransformer) - A custom transformer for content.
```
--------------------------------
### UnpackOptions Constructor
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/UnpackOptions.html
Initializes a new instance of the UnpackOptions class.
```APIDOC
## UnpackOptions Constructor
### Description
Initializes a new instance of the UnpackOptions class.
### Method
```java
public UnpackOptions()
```
```
--------------------------------
### Get Umask
Source: https://maven.apache.org/plugins/maven-assembly-plugin/xref/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiver.html
Retrieves the umask from the delegate archiver. Used for file permission information.
```java
public int getUmask() {
return delegate.getUmask();
}
```
--------------------------------
### getMavenReaderFilter()
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.html
Gets the Maven reader filter utility, used for filtering content during the build process.
```APIDOC
## getMavenReaderFilter()
### Description
Gets the Maven shared filtering utility.
### Method
`org.apache.maven.shared.filtering.MavenReaderFilter`
### Endpoint
N/A (Internal utility)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
`org.apache.maven.shared.filtering.MavenReaderFilter` - The Maven reader filter instance.
#### Response Example
N/A
```
--------------------------------
### getUnpackOptions
Source: https://maven.apache.org/plugins/maven-assembly-plugin/apidocs/org/apache/maven/plugins/assembly/model/ModuleBinaries.html
Gets the unpack options for module artifacts, including includes and excludes for unpacked items.
```APIDOC
## getUnpackOptions
### Description
Gets the unpack options for module artifacts, including includes and excludes for unpacked items. (Since 2.2).
### Method
public UnpackOptions getUnpackOptions()
### Returns
- **UnpackOptions** - The UnpackOptions object.
```