dependency:unpack-dependencies

Full name:

org.apache.maven.plugins:maven-dependency-plugin:2.3:unpack-dependencies

Description:

Goal that unpacks the project dependencies from the repository to a defined location.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Since version: 1.0.
  • Binds by default to the lifecycle phase: process-sources.

Optional Parameters

Name Type Since Description
classifier String 2.0 Specify classifier to look for. Example: sources
copyPom boolean 2.0 Also copy the pom of each artifact.
Default value is: false.
excludeArtifactIds String 2.0 Comma separated list of Artifact names too exclude.
excludeClassifiers String 2.0 Comma Separated list of Classifiers to exclude. Empty String indicates don't exclude anything (default).
excludeGroupIds String 2.0 Comma separated list of GroupId Names to exclude.
excludeScope String 2.0 Scope to exclude. An Empty string indicates no scopes (default).
excludeTransitive boolean 2.0 If we should exclude transitive dependencies
Default value is: false.
excludeTypes String 2.0 Comma Separated list of Types to exclude. Empty String indicates don't exclude anything (default).
excludes String 2.0 A comma separated list of file patterns to exclude when unpacking the artifact. i.e. **\/*.xml,**\/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)
failOnMissingClassifierArtifact boolean 2.0-alpha-2 This only applies if the classifier parameter is used.
Default value is: true.
includeArtifactIds String 2.0 Comma separated list of Artifact names to include.
includeClassifiers String 2.0 Comma Separated list of Classifiers to include. Empty String indicates include everything (default).
includeGroupIds String 2.0 Comma separated list of GroupIds to include.
includeScope String 2.0 Scope to include. An Empty string indicates all scopes (default).
includeTypes String 2.0 Comma Separated list of Types to include. Empty String indicates include everything (default).
includes String 2.0 A comma separated list of file patterns to include when unpacking the artifact. i.e. **\/*.xml,**\/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)
markersDirectory File 2.0 Directory to store flag files
Default value is: ${project.build.directory}/dependency-maven-plugin-markers.
outputAbsoluteArtifactFilename boolean 2.0 Output absolute filename for resolved artifacts
Default value is: false.
outputDirectory File 1.0 Default location used for mojo unless overridden in ArtifactItem
Default value is: ${project.build.directory}/dependency.
overWriteIfNewer boolean 2.0 Overwrite artifacts that don't exist or are older than the source.
Default value is: true.
overWriteReleases boolean 1.0 Overwrite release artifacts
Default value is: false.
overWriteSnapshots boolean 1.0 Overwrite snapshot artifacts
Default value is: false.
prependGroupId boolean 2.2 Prepend the groupId during copy.
Default value is: false.
silent boolean 2.0 If the plugin should be silent.
Default value is: false.
stripVersion boolean 1.0 Strip artifact version during copy
Default value is: false.
type String 2.0 Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war
Default value is: java-source.
useRepositoryLayout boolean 2.0-alpha-2 Place each artifact in the same directory layout as a default repository.
example: /outputDirectory/junit/junit/3.8.1/junit-3.8.1.jar
Default value is: false.
useSubDirectoryPerArtifact boolean 2.0-alpha-1 Place each file in a separate subdirectory. (example /outputDirectory/junit-3.8.1-jar)
Default value is: false.
useSubDirectoryPerScope boolean 2.2 Place each type of file in a separate subdirectory. (example /outputDirectory/runtime /outputDirectory/provided etc)
Default value is: false.
useSubDirectoryPerType boolean 2.0-alpha-1 Place each type of file in a separate subdirectory. (example /outputDirectory/jars /outputDirectory/wars etc)
Default value is: false.

Parameter Details

classifier:

Specify classifier to look for. Example: sources
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${classifier}

copyPom:

Also copy the pom of each artifact.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • Expression: ${mdep.copyPom}
  • Default: false

excludeArtifactIds:

Comma separated list of Artifact names too exclude.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${excludeArtifactIds}

excludeClassifiers:

Comma Separated list of Classifiers to exclude. Empty String indicates don't exclude anything (default).
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${excludeClassifiers}

excludeGroupIds:

Comma separated list of GroupId Names to exclude.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${excludeGroupIds}

excludeScope:

Scope to exclude. An Empty string indicates no scopes (default).
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${excludeScope}

excludeTransitive:

If we should exclude transitive dependencies
  • Type: boolean
  • Since: 2.0
  • Required: No
  • Expression: ${excludeTransitive}
  • Default: false

excludeTypes:

Comma Separated list of Types to exclude. Empty String indicates don't exclude anything (default).
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${excludeTypes}

excludes:

A comma separated list of file patterns to exclude when unpacking the artifact. i.e. **\/*.xml,**\/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${mdep.unpack.excludes}

failOnMissingClassifierArtifact:

This only applies if the classifier parameter is used.
  • Type: boolean
  • Since: 2.0-alpha-2
  • Required: No
  • Expression: ${mdep.failOnMissingClassifierArtifact}
  • Default: true

includeArtifactIds:

Comma separated list of Artifact names to include.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${includeArtifactIds}

includeClassifiers:

Comma Separated list of Classifiers to include. Empty String indicates include everything (default).
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${includeClassifiers}

includeGroupIds:

Comma separated list of GroupIds to include.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${includeGroupIds}

includeScope:

Scope to include. An Empty string indicates all scopes (default).
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${includeScope}

includeTypes:

Comma Separated list of Types to include. Empty String indicates include everything (default).
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${includeTypes}

includes:

A comma separated list of file patterns to include when unpacking the artifact. i.e. **\/*.xml,**\/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${mdep.unpack.includes}

markersDirectory:

Directory to store flag files
  • Type: java.io.File
  • Since: 2.0
  • Required: No
  • Expression: ${markersDirectory}
  • Default: ${project.build.directory}/dependency-maven-plugin-markers

outputAbsoluteArtifactFilename:

Output absolute filename for resolved artifacts
  • Type: boolean
  • Since: 2.0
  • Required: No
  • Expression: ${outputAbsoluteArtifactFilename}
  • Default: false

outputDirectory:

Default location used for mojo unless overridden in ArtifactItem
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • Expression: ${outputDirectory}
  • Default: ${project.build.directory}/dependency

overWriteIfNewer:

Overwrite artifacts that don't exist or are older than the source.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • Expression: ${overWriteIfNewer}
  • Default: true

overWriteReleases:

Overwrite release artifacts
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${overWriteReleases}
  • Default: false

overWriteSnapshots:

Overwrite snapshot artifacts
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${overWriteSnapshots}
  • Default: false

prependGroupId:

Prepend the groupId during copy.
  • Type: boolean
  • Since: 2.2
  • Required: No
  • Expression: ${mdep.prependGroupId}
  • Default: false

silent:

If the plugin should be silent.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • Expression: ${silent}
  • Default: false

stripVersion:

Strip artifact version during copy
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Expression: ${mdep.stripVersion}
  • Default: false

type:

Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Expression: ${type}
  • Default: java-source

useRepositoryLayout:

Place each artifact in the same directory layout as a default repository.
example: /outputDirectory/junit/junit/3.8.1/junit-3.8.1.jar
  • Type: boolean
  • Since: 2.0-alpha-2
  • Required: No
  • Expression: ${mdep.useRepositoryLayout}
  • Default: false

useSubDirectoryPerArtifact:

Place each file in a separate subdirectory. (example /outputDirectory/junit-3.8.1-jar)
  • Type: boolean
  • Since: 2.0-alpha-1
  • Required: No
  • Expression: ${mdep.useSubDirectoryPerArtifact}
  • Default: false

useSubDirectoryPerScope:

Place each type of file in a separate subdirectory. (example /outputDirectory/runtime /outputDirectory/provided etc)
  • Type: boolean
  • Since: 2.2
  • Required: No
  • Expression: ${mdep.useSubDirectoryPerScope}
  • Default: false

useSubDirectoryPerType:

Place each type of file in a separate subdirectory. (example /outputDirectory/jars /outputDirectory/wars etc)
  • Type: boolean
  • Since: 2.0-alpha-1
  • Required: No
  • Expression: ${mdep.useSubDirectoryPerType}
  • Default: false