Apache MyFaces
Project Documentation
Foundation

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:

  1. 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.
  2. 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

artifactCollector

Artifact collector, needed to resolve dependencies.

  • Type: org.apache.maven.artifact.resolver.ArtifactCollector
  • Required: No

artifactItems

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

artifactMetadataSource

No Description.

  • Type: org.apache.maven.artifact.metadata.ArtifactMetadataSource
  • Required: No

baseDirectory1

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

baseDirectory2

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

excludes

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}

includes

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}

markersDirectory

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

outputDirectory

Default location used for mojo unless overridden in ArtifactItem

  • Type: java.io.File
  • Required: No
  • Expression: ${outputDirectory}
  • Default: ${project.build.directory}/dependency

overWriteIfNewer

Overwrite if newer

  • Type: boolean
  • Required: No
  • Expression: ${mdep.overIfNewer}
  • Default: true

overWriteReleases

Overwrite release artifacts

  • Type: boolean
  • Required: No
  • Expression: ${mdep.overWriteReleases}
  • Default: false

overWriteSnapshots

Overwrite snapshot artifacts

  • Type: boolean
  • Required: No
  • Expression: ${mdep.overWriteSnapshots}
  • Default: false

scanModel

If the plugin should scan the model

  • Type: boolean
  • Required: No
  • Expression: ${scanModel}
  • Default: false

silent

If the plugin should be silent.

  • Type: boolean
  • Required: No
  • Expression: ${silent}
  • Default: false