@Mojo(name="build-classpath", requiresDependencyResolution=TEST, defaultPhase=GENERATE_SOURCES, threadSafe=true) public class BuildClasspathMojo extends AbstractDependencyFilterMojo implements Comparator<Artifact>
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, type
outputAbsoluteArtifactFilename, reactorProjects, session
Constructor and Description |
---|
BuildClasspathMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendArtifactPath(Artifact art,
StringBuilder sb)
Appends the artifact path into the specified StringBuilder.
|
protected void |
attachFile(String cpString) |
int |
compare(Artifact art1,
Artifact art2)
Compares artifacts lexicographically, using pattern [group_id][artifact_id][version].
|
protected void |
doExecute()
Main entry into mojo.
|
protected ArtifactsFilter |
getMarkedArtifactFilter()
Return an
ArtifactsFilter indicating which artifacts must be filtered out. |
boolean |
isStripVersion() |
protected String |
readClasspathFile()
Reads into a string the file specified by the mojo param 'outputFile'.
|
void |
setFileSeparator(String theFileSeparator) |
void |
setLocalRepoProperty(String localRepoProperty) |
void |
setOutputFile(File outputFile) |
void |
setOutputProperty(String theOutputProperty) |
void |
setPathSeparator(String thePathSeparator) |
void |
setPrefix(String thePrefix) |
void |
setRegenerateFile(boolean theRegenerateFile) |
void |
setStripVersion(boolean theStripVersion) |
filterMarkedDependencies, getArtifactResolver, getClassifierTranslatedDependencies, getDependencyResolver, getDependencySets, getDependencySets, getMarkersDirectory, getRepositoryManager, getResolvedDependencies, isPrependGroupId, resolve, setMarkersDirectory, setPrependGroupId
copyFile, execute, getArchiverManager, getProject, isSilent, isSkip, isUseJvmChmod, newResolveArtifactProjectBuildingRequest, setArchiverManager, setSilent, setSkip, setUseJvmChmod, unpack, unpack, unpack
getLog, getPluginContext, setLog, setPluginContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
protected void doExecute() throws MojoExecutionException
doExecute
in class AbstractDependencyMojo
MojoExecutionException
- with a message if an error occurs.AbstractDependencyFilterMojo.getResolvedDependencies(boolean)
protected void attachFile(String cpString) throws MojoExecutionException
cpString
- The classpath.MojoExecutionException
- in case of an error.protected void appendArtifactPath(Artifact art, StringBuilder sb)
art
- Artifact
sb
- StringBuilder
protected String readClasspathFile() throws IOException
IOException
- in case of an error.public int compare(Artifact art1, Artifact art2)
compare
in interface Comparator<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 ArtifactsFilter getMarkedArtifactFilter()
AbstractDependencyFilterMojo
ArtifactsFilter
indicating which artifacts must be filtered out.getMarkedArtifactFilter
in class AbstractDependencyFilterMojo
ArtifactsFilter
indicating which artifacts must be filtered out.public void setOutputFile(File outputFile)
outputFile
- the outputFile to setpublic void setOutputProperty(String theOutputProperty)
theOutputProperty
- the outputProperty to setpublic void setFileSeparator(String theFileSeparator)
theFileSeparator
- the fileSeparator to setpublic void setPathSeparator(String thePathSeparator)
thePathSeparator
- the pathSeparator to setpublic void setPrefix(String thePrefix)
thePrefix
- the prefix to setpublic void setRegenerateFile(boolean theRegenerateFile)
theRegenerateFile
- the regenerateFile to setpublic boolean isStripVersion()
public void setStripVersion(boolean theStripVersion)
theStripVersion
- the stripVersion to setpublic void setLocalRepoProperty(String localRepoProperty)
localRepoProperty
- localRepoProperty
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.