|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.dependency.AbstractDependencyMojo
org.apache.maven.plugin.dependency.fromDependencies.AbstractDependencyFilterMojo
org.apache.maven.plugin.dependency.fromDependencies.BuildClasspathMojo
@Mojo(name="build-classpath", requiresDependencyResolution=TEST, defaultPhase=GENERATE_SOURCES, threadSafe=true) public class BuildClasspathMojo
This goal will output a classpath string of dependencies from the local repository to a file or log.
Field Summary | |
---|---|
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 |
Fields inherited from class org.apache.maven.plugin.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.plugin.dependency.AbstractDependencyMojo |
---|
archiverManager, artifactCollector, artifactMetadataSource, factory, outputAbsoluteArtifactFilename, project, reactorProjects, remoteRepos, resolver, silent |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
BuildClasspathMojo()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class org.apache.maven.plugin.dependency.fromDependencies.AbstractDependencyFilterMojo |
---|
filterMarkedDependencies, getClassifierTranslatedDependencies, getDependencySets, getDependencySets, getMarkersDirectory, getResolvedDependencies, isPrependGroupId, setMarkersDirectory, setPrependGroupId |
Methods inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo |
---|
copyFile, execute, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, getLocal, getLog, getProject, getRemoteRepos, getResolver, isSkip, isUseJvmChmod, setArchiverManager, setArtifactCollector, setArtifactMetadataSource, setFactory, setLocal, setRemoteRepos, setResolver, setSkip, setUseJvmChmod, unpack, unpack |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
---|
getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Field Detail |
---|
@Parameter(property="mdep.useBaseVersion", defaultValue="true") protected boolean useBaseVersion
isStripVersion()
is false
.
@Parameter protected boolean useJvmChmod
@Parameter protected boolean ignorePermissions
Constructor Detail |
---|
public BuildClasspathMojo()
Method Detail |
---|
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 object
0
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |