@Mojo(name="build-classpath", requiresDependencyResolution=TEST, defaultPhase=GENERATE_SOURCES, threadSafe=true) public class BuildClasspathMojo extends AbstractDependencyFilterMojo implements Comparator<org.apache.maven.artifact.Artifact>
Modifier and Type | Field and Description |
---|---|
protected boolean |
useBaseVersion
Either append the artifact's baseVersion or uniqueVersion to the filename.
|
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, type
archiverManager, artifactCollector, artifactMetadataSource, factory, ignorePermissions, outputAbsoluteArtifactFilename, project, reactorProjects, remoteRepos, resolver, silent, useJvmChmod
Constructor and Description |
---|
BuildClasspathMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendArtifactPath(org.apache.maven.artifact.Artifact art,
StringBuilder sb)
Appends the artifact path into the specified StringBuilder.
|
protected void |
attachFile(String cpString) |
int |
compare(org.apache.maven.artifact.Artifact art1,
org.apache.maven.artifact.Artifact art2)
Compares artifacts lexicographically, using pattern [group_id][artifact_id][version].
|
protected void |
doExecute()
Main entry into mojo.
|
File |
getCpFile() |
String |
getFileSeparator() |
String |
getLocalRepoProperty() |
protected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter |
getMarkedArtifactFilter()
Return an
ArtifactsFilter indicating which artifacts must be filtered out. |
String |
getOutputProperty() |
String |
getPathSeparator() |
String |
getPrefix() |
boolean |
isFileSepSet() |
boolean |
isPathSepSet() |
boolean |
isRegenerateFile() |
boolean |
isStripVersion() |
protected String |
readClasspathFile()
Reads into a string the file specified by the mojo param 'outputFile'.
|
void |
setCpFile(File theCpFile) |
void |
setFileSeparator(String theFileSeparator) |
void |
setFileSepSet(boolean isFileSepSet) |
void |
setLocalRepoProperty(String localRepoProperty) |
void |
setOutputProperty(String theOutputProperty) |
void |
setPathSeparator(String thePathSeparator) |
void |
setPathSepSet(boolean isPathSepSet) |
void |
setPrefix(String thePrefix) |
void |
setRegenerateFile(boolean theRegenerateFile) |
void |
setStripVersion(boolean theStripVersion) |
filterMarkedDependencies, getClassifierTranslatedDependencies, getDependencySets, getMarkersDirectory, getResolvedDependencies, isPrependGroupId, setMarkersDirectory, setPrependGroupId
copyFile, execute, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, getLocal, getLog, getProject, getRemoteRepos, getResolver, isSkip, isUseJvmChmod, setArchiverManager, setArtifactCollector, setArtifactMetadataSource, setFactory, setLocal, setRemoteRepos, setResolver, setSkip, setUseJvmChmod, unpack, unpack
getPluginContext, setLog, setPluginContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
@Parameter(property="mdep.useBaseVersion", defaultValue="true") protected boolean useBaseVersion
isStripVersion()
is false
.protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException
doExecute
in class AbstractDependencyMojo
org.apache.maven.plugin.MojoExecutionException
- with a message if an error occurs.#getDependencies
,
#copyArtifact(Artifact, boolean)
protected void attachFile(String cpString) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void appendArtifactPath(org.apache.maven.artifact.Artifact art, StringBuilder sb)
art
- sb
- protected String readClasspathFile() throws IOException
org.apache.maven.plugin.MojoExecutionException
IOException
public int compare(org.apache.maven.artifact.Artifact art1, org.apache.maven.artifact.Artifact art2)
compare
in interface Comparator<org.apache.maven.artifact.Artifact>
art1
- first objectart2
- second object0
if the argument string is equal to this string; a value less than
0
if this string is lexicographically less than the string argument; and a value greater
than 0
if this string is lexicographically greater than the string argument.protected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter getMarkedArtifactFilter()
AbstractDependencyFilterMojo
ArtifactsFilter
indicating which artifacts must be filtered out.getMarkedArtifactFilter
in class AbstractDependencyFilterMojo
ArtifactsFilter
indicating which artifacts must be filtered out.public File getCpFile()
public void setCpFile(File theCpFile)
theCpFile
- the outputFile to setpublic String getOutputProperty()
public void setOutputProperty(String theOutputProperty)
theOutputProperty
- the outputProperty to setpublic String getFileSeparator()
public void setFileSeparator(String theFileSeparator)
theFileSeparator
- the fileSeparator to setpublic String getPathSeparator()
public void setPathSeparator(String thePathSeparator)
thePathSeparator
- the pathSeparator to setpublic String getPrefix()
public void setPrefix(String thePrefix)
thePrefix
- the prefix to setpublic boolean isRegenerateFile()
public void setRegenerateFile(boolean theRegenerateFile)
theRegenerateFile
- the regenerateFile to setpublic boolean isStripVersion()
public void setStripVersion(boolean theStripVersion)
theStripVersion
- the stripVersion to setpublic String getLocalRepoProperty()
public void setLocalRepoProperty(String localRepoProperty)
public boolean isFileSepSet()
public void setFileSepSet(boolean isFileSepSet)
public boolean isPathSepSet()
public void setPathSepSet(boolean isPathSepSet)
Copyright © 2002-2015 The Apache Software Foundation. All Rights Reserved.