Class AbstractFromDependenciesMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.dependency.AbstractDependencyMojo
-
- org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
-
- org.apache.maven.plugins.dependency.fromDependencies.AbstractFromDependenciesMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
CopyDependenciesMojo,UnpackDependenciesMojo
public abstract class AbstractFromDependenciesMojo extends AbstractDependencyFilterMojo
Abstract Parent class used by mojos that get Artifact information from the project dependencies.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanfailOnMissingClassifierArtifactThis only applies if the classifier parameter is used.protected java.io.FileoutputDirectoryOutput location.protected booleanstripClassifierStrip artifact classifier during copy.protected booleanstripTypeStrip artifact type during copy.protected booleanstripVersionStrip artifact version during copy.protected booleanuseRepositoryLayoutPlace each artifact in the same directory layout as a default repository.protected booleanuseSubDirectoryPerArtifactPlace each file in a separate subdirectory.protected booleanuseSubDirectoryPerScopePlace each type of file in a separate subdirectory.protected booleanuseSubDirectoryPerTypePlace each type of file in a separate subdirectory.-
Fields inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, type
-
Fields inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
session
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFromDependenciesMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, ResolverUtil resolverUtil, org.apache.maven.project.ProjectBuilder projectBuilder, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FilegetOutputDirectory()booleanisFailOnMissingClassifierArtifact()booleanisStripType()booleanisStripVersion()booleanisUseRepositoryLayout()booleanisUseSubDirectoryPerArtifact()booleanisUseSubDirectoryPerScope()booleanisUseSubDirectoryPerType()voidsetFailOnMissingClassifierArtifact(boolean failOnMissingClassifierArtifact)voidsetOutputDirectory(java.io.File theOutputDirectory)voidsetStripType(boolean stripType)voidsetStripVersion(boolean stripVersion)voidsetUseRepositoryLayout(boolean useRepositoryLayout)voidsetUseSubDirectoryPerArtifact(boolean theUseSubDirectoryPerArtifact)voidsetUseSubDirectoryPerScope(boolean theUseSubDirectoryPerScope)voidsetUseSubDirectoryPerType(boolean theUseSubDirectoryPerType)-
Methods inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
filterMarkedDependencies, getDependencySets, getDependencySets, getMarkedArtifactFilter, getMarkersDirectory, getResolvedDependencies, getResolverUtil, isPrependGroupId, setMarkersDirectory, setPrependGroupId
-
Methods inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
doExecute, execute, getProject, isSilent, isSkip, setSilent, setSkip
-
-
-
-
Field Detail
-
outputDirectory
@Parameter(property="outputDirectory", defaultValue="${project.build.directory}/dependency") protected java.io.File outputDirectoryOutput location.- Since:
- 1.0
-
stripVersion
@Parameter(property="mdep.stripVersion", defaultValue="false") protected boolean stripVersionStrip artifact version during copy.
-
stripType
@Parameter(property="mdep.stripType", defaultValue="false") protected boolean stripTypeStrip artifact type during copy.- Since:
- 3.4.0
-
stripClassifier
@Parameter(property="mdep.stripClassifier", defaultValue="false") protected boolean stripClassifierStrip artifact classifier during copy.
-
useRepositoryLayout
@Parameter(property="mdep.useRepositoryLayout", defaultValue="false") protected boolean useRepositoryLayoutPlace each artifact in the same directory layout as a default repository.
example:
/outputDirectory/junit/junit/3.8.1/junit-3.8.1.jar
- Since:
- 2.0-alpha-2
-
useSubDirectoryPerScope
@Parameter(property="mdep.useSubDirectoryPerScope", defaultValue="false") protected boolean useSubDirectoryPerScopePlace each type of file in a separate subdirectory. (example /outputDirectory/runtime /outputDirectory/provided etc.)- Since:
- 2.2
-
useSubDirectoryPerType
@Parameter(property="mdep.useSubDirectoryPerType", defaultValue="false") protected boolean useSubDirectoryPerTypePlace each type of file in a separate subdirectory. (example /outputDirectory/jars /outputDirectory/wars etc.)- Since:
- 2.0-alpha-1
-
useSubDirectoryPerArtifact
@Parameter(property="mdep.useSubDirectoryPerArtifact", defaultValue="false") protected boolean useSubDirectoryPerArtifactPlace each file in a separate subdirectory. (example/outputDirectory/junit-3.8.1-jar)- Since:
- 2.0-alpha-1
-
failOnMissingClassifierArtifact
@Parameter(property="mdep.failOnMissingClassifierArtifact", defaultValue="false") protected boolean failOnMissingClassifierArtifactThis only applies if the classifier parameter is used.- Since:
- 2.0-alpha-2
-
-
Constructor Detail
-
AbstractFromDependenciesMojo
protected AbstractFromDependenciesMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, ResolverUtil resolverUtil, org.apache.maven.project.ProjectBuilder projectBuilder, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager)
-
-
Method Detail
-
getOutputDirectory
public java.io.File getOutputDirectory()
- Returns:
- returns the output directory
-
setOutputDirectory
public void setOutputDirectory(java.io.File theOutputDirectory)
- Parameters:
theOutputDirectory- the outputDirectory to set
-
isUseSubDirectoryPerArtifact
public boolean isUseSubDirectoryPerArtifact()
- Returns:
- returns the useSubDirectoryPerArtifact
-
setUseSubDirectoryPerArtifact
public void setUseSubDirectoryPerArtifact(boolean theUseSubDirectoryPerArtifact)
- Parameters:
theUseSubDirectoryPerArtifact- the useSubDirectoryPerArtifact to set
-
isUseSubDirectoryPerScope
public boolean isUseSubDirectoryPerScope()
- Returns:
- returns the useSubDirectoryPerScope
-
setUseSubDirectoryPerScope
public void setUseSubDirectoryPerScope(boolean theUseSubDirectoryPerScope)
- Parameters:
theUseSubDirectoryPerScope- the useSubDirectoryPerScope to set
-
isUseSubDirectoryPerType
public boolean isUseSubDirectoryPerType()
- Returns:
- returns the useSubDirectoryPerType
-
setUseSubDirectoryPerType
public void setUseSubDirectoryPerType(boolean theUseSubDirectoryPerType)
- Parameters:
theUseSubDirectoryPerType- the useSubDirectoryPerType to set
-
isFailOnMissingClassifierArtifact
public boolean isFailOnMissingClassifierArtifact()
- Returns:
failOnMissingClassifierArtifact
-
setFailOnMissingClassifierArtifact
public void setFailOnMissingClassifierArtifact(boolean failOnMissingClassifierArtifact)
- Parameters:
failOnMissingClassifierArtifact-failOnMissingClassifierArtifact
-
isStripVersion
public boolean isStripVersion()
- Returns:
stripVersion
-
setStripVersion
public void setStripVersion(boolean stripVersion)
- Parameters:
stripVersion-stripVersion
-
isStripType
public boolean isStripType()
- Returns:
stripType
-
setStripType
public void setStripType(boolean stripType)
- Parameters:
stripType-stripType
-
isUseRepositoryLayout
public boolean isUseRepositoryLayout()
- Returns:
- true, if dependencies must be planted in a repository layout
-
setUseRepositoryLayout
public void setUseRepositoryLayout(boolean useRepositoryLayout)
- Parameters:
useRepositoryLayout- true if dependencies must be planted in a repository layout
-
-