myfaces-builder:unpack
Goal that retrieves a list of artifacts from the repository and unpacks them in a defined location.
This mojo reutilize org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo from maven-dependency-plugin.
The idea of this plugin, instead just unpack a list of artifacts is add some new features necessary to make easier maintain 1.1 and 1.2 code on myfaces projects like tomahawk.
This plugin works as unpack goal of maven-dependency-plugin with 2 additional enhancements:
- If some file exists on the base directories, it is added as excluded, so it is not copied to the output directory. This makes easier to manage the code and maintain it.
- If a file is generated from the model (reading the myfaces-metadata.xml) it is not copied, since this should be generated again.
Mojo Attributes:
- Requires a Maven 2.0 project to execute.
- Automatically executes within the lifecycle phase: process-sources
Required Parameters
Name | Type | Description |
---|---|---|
artifactItems | ArrayList | Collection of ArtifactItems to work on. (ArtifactItem contains groupId, artifactId, version, type, classifier, location, destFile, markerFile and overwrite.) See "Usage" and "Javadoc" for details. |
Optional Parameters
Name | Type | Description |
---|---|---|
artifactCollector | ArtifactCollector | Artifact collector, needed to resolve dependencies. |
artifactMetadataSource | ArtifactMetadataSource | No description. |
baseDirectory1 | File | Directory where he should check if a file exists or not. If exists, he does not copy to , if not he copy it to the output directory. This is possible because all files on this directory are added as excluded param. |
baseDirectory2 | File | Directory where he should check if a file exists or not. If exists, he does not copy to , if not he copy it to the output directory. This is possible because all files on this directory are added as excluded param. |
excludes | String | A comma separated list of file patterns to exclude when unpacking the artifact. i.e. **\/*.xml,**\/*.properties |
includes | String | A comma separated list of file patterns to include when unpacking the artifact. i.e. **\/*.xml,**\/*.properties |
markersDirectory | File | Directory to store flag files after unpack |
outputAbsoluteArtifactFilename | boolean | Output absolute filename for resolved artifacts Default value is false. |
outputDirectory | File | Default location used for mojo unless overridden in ArtifactItem Default value is ${project.build.directory}/dependency. |
overWriteIfNewer | boolean | Overwrite if newer Default value is true. |
overWriteReleases | boolean | Overwrite release artifacts Default value is false. |
overWriteSnapshots | boolean | Overwrite snapshot artifacts Default value is false. |
scanModel | boolean | If the plugin should scan the model Default value is false. |
silent | boolean | If the plugin should be silent. Default value is false. |
Parameter Details
Artifact collector, needed to resolve dependencies.
- Type: org.apache.maven.artifact.resolver.ArtifactCollector
- Required: No
Collection of ArtifactItems to work on. (ArtifactItem contains groupId, artifactId, version, type, classifier, location, destFile, markerFile and overwrite.) See "Usage" and "Javadoc" for details.
- Type: java.util.ArrayList
- Required: Yes
No Description.
- Type: org.apache.maven.artifact.metadata.ArtifactMetadataSource
- Required: No
Directory where he should check if a file exists or not. If exists, he does not copy to , if not he copy it to the output directory. This is possible because all files on this directory are added as excluded param.
- Type: java.io.File
- Required: No
- Expression: src/main/java
Directory where he should check if a file exists or not. If exists, he does not copy to , if not he copy it to the output directory. This is possible because all files on this directory are added as excluded param.
- Type: java.io.File
- Required: No
A comma separated list of file patterns to exclude when unpacking the artifact. i.e. **\/*.xml,**\/*.properties
- Type: java.lang.String
- Required: No
- Expression: ${mdep.unpack.excludes}
A comma separated list of file patterns to include when unpacking the artifact. i.e. **\/*.xml,**\/*.properties
- Type: java.lang.String
- Required: No
- Expression: ${mdep.unpack.includes}
Directory to store flag files after unpack
- Type: java.io.File
- Required: No
- Expression: ${project.build.directory}/dependency-maven-plugin-markers
outputAbsoluteArtifactFilename
Output absolute filename for resolved artifacts
- Type: boolean
- Required: No
- Expression: ${outputAbsoluteArtifactFilename}
- Default: false
Default location used for mojo unless overridden in ArtifactItem
- Type: java.io.File
- Required: No
- Expression: ${outputDirectory}
- Default: ${project.build.directory}/dependency
Overwrite if newer
- Type: boolean
- Required: No
- Expression: ${mdep.overIfNewer}
- Default: true
Overwrite release artifacts
- Type: boolean
- Required: No
- Expression: ${mdep.overWriteReleases}
- Default: false
Overwrite snapshot artifacts
- Type: boolean
- Required: No
- Expression: ${mdep.overWriteSnapshots}
- Default: false
If the plugin should scan the model
- Type: boolean
- Required: No
- Expression: ${scanModel}
- Default: false
If the plugin should be silent.
- Type: boolean
- Required: No
- Expression: ${silent}
- Default: false