org.apache.maven.plugin.assembly.model
Class DependencySet
java.lang.Object
org.apache.maven.plugin.assembly.model.SetBase
org.apache.maven.plugin.assembly.model.DependencySet
- All Implemented Interfaces:
- java.io.Serializable
- public class DependencySet
- extends SetBase
- implements java.io.Serializable
A dependencySet allows inclusion and exclusion of
project dependencies
in the assembly.
- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
|
Method Summary |
java.lang.String |
getModelEncoding()
|
java.lang.String |
getOutputFileNameMapping()
Get
Sets the mapping pattern for all NON-UNPACKED
dependencies included in this
assembly. |
java.lang.String |
getScope()
Get
Sets the dependency scope for this
dependencySet. |
UnpackOptions |
getUnpackOptions()
Get
Allows the specification of includes and excludes,
along with filtering options, for items
unpacked from a dependency artifact. |
boolean |
isUnpack()
Get
If set to true, this property will unpack all
dependencies
into the specified output directory. |
boolean |
isUseProjectArtifact()
Get
Determines whether the artifact produced during
the current project's
build should be included in this dependency set. |
boolean |
isUseProjectAttachments()
Get
Determines whether the attached artifacts produced
during the current project's
build should be included in this dependency set. |
boolean |
isUseTransitiveDependencies()
Get
Determines whether transitive dependencies will be
included in the processing of
the current dependency set. |
boolean |
isUseTransitiveFiltering()
Get
Determines whether the include/exclude patterns in
this dependency set will be applied to
the transitive path of a given artifact. |
void |
setModelEncoding(java.lang.String modelEncoding)
Set an encoding used for reading/writing the model. |
void |
setOutputFileNameMapping(java.lang.String outputFileNameMapping)
Set
Sets the mapping pattern for all NON-UNPACKED
dependencies included in this
assembly. |
void |
setScope(java.lang.String scope)
Set
Sets the dependency scope for this
dependencySet. |
void |
setUnpack(boolean unpack)
Set
If set to true, this property will unpack all
dependencies
into the specified output directory. |
void |
setUnpackOptions(UnpackOptions unpackOptions)
Set
Allows the specification of includes and excludes,
along with filtering options, for items
unpacked from a dependency artifact. |
void |
setUseProjectArtifact(boolean useProjectArtifact)
Set
Determines whether the artifact produced during
the current project's
build should be included in this dependency set. |
void |
setUseProjectAttachments(boolean useProjectAttachments)
Set
Determines whether the attached artifacts produced
during the current project's
build should be included in this dependency set. |
void |
setUseTransitiveDependencies(boolean useTransitiveDependencies)
Set
Determines whether transitive dependencies will be
included in the processing of
the current dependency set. |
void |
setUseTransitiveFiltering(boolean useTransitiveFiltering)
Set
Determines whether the include/exclude patterns in
this dependency set will be applied to
the transitive path of a given artifact. |
| Methods inherited from class org.apache.maven.plugin.assembly.model.SetBase |
addExclude, addInclude, getDirectoryMode, getExcludes, getFileMode, getIncludes, getOutputDirectory, isUseDefaultExcludes, isUseStrictFiltering, removeExclude, removeInclude, setDirectoryMode, setExcludes, setFileMode, setIncludes, setOutputDirectory, setUseDefaultExcludes, setUseStrictFiltering |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DependencySet
public DependencySet()
getOutputFileNameMapping
public java.lang.String getOutputFileNameMapping()
- Get
Sets the mapping pattern for all NON-UNPACKED
dependencies included in this
assembly. Default is
${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}.
If the artifact doesn't have a classifier, that
part of the pattern will be left off.
(Since 2.2-beta-2; 2.2-beta-1 uses
${artifactId}-${version}${dashClassifier?}.${extension})
NOTE: If the
dependencySet specifies unpack == true,
outputFileNameMapping WILL NOT BE USED; in these cases, use
outputDirectory.
- Returns:
- String
getScope
public java.lang.String getScope()
- Get
Sets the dependency scope for this
dependencySet.
Default scope value is "runtime".
- Returns:
- String
getUnpackOptions
public UnpackOptions getUnpackOptions()
- Get
Allows the specification of includes and excludes,
along with filtering options, for items
unpacked from a dependency artifact.
- Returns:
- UnpackOptions
isUnpack
public boolean isUnpack()
- Get
If set to true, this property will unpack all
dependencies
into the specified output directory. When set to
false
dependencies will be includes as archives
(jars).
Default value is false.
- Returns:
- boolean
isUseProjectArtifact
public boolean isUseProjectArtifact()
- Get
Determines whether the artifact produced during
the current project's
build should be included in this dependency set.
Default value is true,
for backward compatibility. (Since 2.2)
.
- Returns:
- boolean
isUseProjectAttachments
public boolean isUseProjectAttachments()
- Get
Determines whether the attached artifacts produced
during the current project's
build should be included in this dependency set.
Default value is false. (Since 2.2)
.
- Returns:
- boolean
isUseTransitiveDependencies
public boolean isUseTransitiveDependencies()
- Get
Determines whether transitive dependencies will be
included in the processing of
the current dependency set. If true,
includes/excludes/useTransitiveFiltering
will apply to transitive dependency artifacts in
addition to the main project
dependency artifacts. If false,
useTransitiveFiltering is meaningless, and
includes/excludes only affect the immediate
dependencies of the project.
By default, this value is true. (Since 2.2)
.
- Returns:
- boolean
isUseTransitiveFiltering
public boolean isUseTransitiveFiltering()
- Get
Determines whether the include/exclude patterns in
this dependency set will be applied to
the transitive path of a given artifact. If true,
and the current artifact is a transitive
dependency brought in by another artifact which
matches an inclusion or exclusion pattern,
then the current artifact has the same
inclusion/exclusion logic applied to it as well. By
default, this value is false, in order to preserve
backward compatibility with version 2.1.
This means that includes/excludes only apply
directly to the current artifact, and not to
the transitive set of artifacts which brought it
in. (Since 2.2)
.
- Returns:
- boolean
setOutputFileNameMapping
public void setOutputFileNameMapping(java.lang.String outputFileNameMapping)
- Set
Sets the mapping pattern for all NON-UNPACKED
dependencies included in this
assembly. Default is
${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}.
If the artifact doesn't have a classifier, that
part of the pattern will be left off.
(Since 2.2-beta-2; 2.2-beta-1 uses
${artifactId}-${version}${dashClassifier?}.${extension})
NOTE: If the
dependencySet specifies unpack == true,
outputFileNameMapping WILL NOT BE USED; in these cases, use
outputDirectory.
- Parameters:
outputFileNameMapping -
setScope
public void setScope(java.lang.String scope)
- Set
Sets the dependency scope for this
dependencySet.
Default scope value is "runtime".
- Parameters:
scope -
setUnpack
public void setUnpack(boolean unpack)
- Set
If set to true, this property will unpack all
dependencies
into the specified output directory. When set to
false
dependencies will be includes as archives
(jars).
Default value is false.
- Parameters:
unpack -
setUnpackOptions
public void setUnpackOptions(UnpackOptions unpackOptions)
- Set
Allows the specification of includes and excludes,
along with filtering options, for items
unpacked from a dependency artifact.
- Parameters:
unpackOptions -
setUseProjectArtifact
public void setUseProjectArtifact(boolean useProjectArtifact)
- Set
Determines whether the artifact produced during
the current project's
build should be included in this dependency set.
Default value is true,
for backward compatibility. (Since 2.2)
.
- Parameters:
useProjectArtifact -
setUseProjectAttachments
public void setUseProjectAttachments(boolean useProjectAttachments)
- Set
Determines whether the attached artifacts produced
during the current project's
build should be included in this dependency set.
Default value is false. (Since 2.2)
.
- Parameters:
useProjectAttachments -
setUseTransitiveDependencies
public void setUseTransitiveDependencies(boolean useTransitiveDependencies)
- Set
Determines whether transitive dependencies will be
included in the processing of
the current dependency set. If true,
includes/excludes/useTransitiveFiltering
will apply to transitive dependency artifacts in
addition to the main project
dependency artifacts. If false,
useTransitiveFiltering is meaningless, and
includes/excludes only affect the immediate
dependencies of the project.
By default, this value is true. (Since 2.2)
.
- Parameters:
useTransitiveDependencies -
setUseTransitiveFiltering
public void setUseTransitiveFiltering(boolean useTransitiveFiltering)
- Set
Determines whether the include/exclude patterns in
this dependency set will be applied to
the transitive path of a given artifact. If true,
and the current artifact is a transitive
dependency brought in by another artifact which
matches an inclusion or exclusion pattern,
then the current artifact has the same
inclusion/exclusion logic applied to it as well. By
default, this value is false, in order to preserve
backward compatibility with version 2.1.
This means that includes/excludes only apply
directly to the current artifact, and not to
the transitive set of artifacts which brought it
in. (Since 2.2)
.
- Parameters:
useTransitiveFiltering -
setModelEncoding
public void setModelEncoding(java.lang.String modelEncoding)
- Set an encoding used for reading/writing the model.
- Overrides:
setModelEncoding in class SetBase
- Parameters:
modelEncoding - the encoding used when reading/writing the model.
getModelEncoding
public java.lang.String getModelEncoding()
- Overrides:
getModelEncoding in class SetBase
- Returns:
- the current encoding used when reading/writing this model.
Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.