@Mojo(name="build-classpath", requiresDependencyResolution=TEST, defaultPhase=GENERATE_SOURCES, threadSafe=true) public class BuildClasspathMojo extends AbstractDependencyFilterMojo implements Comparator<org.apache.maven.artifact.Artifact>
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, type
reactorProjects, session
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.
|
protected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter |
getMarkedArtifactFilter()
Return an
ArtifactsFilter indicating which artifacts must be filtered out. |
boolean |
isStripVersion() |
protected String |
readClasspathFile()
Reads the file specified by the mojo param 'outputFile' into a string.
|
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
execute, getProject, isSilent, isSkip, newResolveArtifactProjectBuildingRequest, newResolvePluginProjectBuildingRequest, setSilent, setSkip
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 org.apache.maven.plugin.MojoExecutionException
doExecute
in class AbstractDependencyMojo
org.apache.maven.plugin.MojoExecutionException
- with a message if an error occurs.AbstractDependencyFilterMojo.getResolvedDependencies(boolean)
protected void attachFile(String cpString) throws org.apache.maven.plugin.MojoExecutionException
cpString
- The classpath.org.apache.maven.plugin.MojoExecutionException
- in case of an error.protected void appendArtifactPath(org.apache.maven.artifact.Artifact art, StringBuilder sb)
art
- Artifact
sb
- StringBuilder
protected String readClasspathFile() throws IOException
IOException
- in case of an errorpublic 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 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–2024 The Apache Software Foundation. All rights reserved.