@Mojo(name="build-classpath", requiresDependencyResolution=TEST, defaultPhase=GENERATE_SOURCES, threadSafe=true) public class BuildClasspathMojo extends AbstractDependencyFilterMojo implements Comparator<Artifact>
Modifier and Type | Field and Description |
---|---|
protected boolean |
ignorePermissions
not used in this goal
|
protected boolean |
useBaseVersion
Either append the artifact's baseVersion or uniqueVersion to the filename.
|
protected boolean |
useJvmChmod
not used in this goal
|
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, type
archiverManager, artifactCollector, artifactMetadataSource, factory, outputAbsoluteArtifactFilename, project, reactorProjects, remoteRepos, resolver, silent
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.
|
File |
getCpFile() |
String |
getFileSeparator() |
String |
getLocalRepoProperty() |
protected 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, 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
.@Parameter protected boolean useJvmChmod
@Parameter protected boolean ignorePermissions
protected void doExecute() throws MojoExecutionException
doExecute
in class AbstractDependencyMojo
MojoExecutionException
- with a message if an error occurs.#getDependencies
,
#copyArtifact(Artifact, boolean)
protected void attachFile(String cpString) throws MojoExecutionException
MojoExecutionException
protected void appendArtifactPath(Artifact art, StringBuilder sb)
art
- sb
- protected String readClasspathFile() throws IOException
MojoExecutionException
IOException
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 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.