|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VersionsHelper
Helper class that provides common functionality required by both the mojos and the reports.
| Method Summary | |
|---|---|
Artifact |
createDependencyArtifact(Dependency dependency)
Shorthand method for getArtifactFactory().createDependencyArtifact(...) which extracts the
parameters from the Dependency instance. |
Artifact |
createDependencyArtifact(String groupId,
String artifactId,
VersionRange version,
String type,
String classifier,
String scope,
boolean optional)
Shorthand method for getArtifactFactory().createDependencyArtifact(...). |
Artifact |
createPluginArtifact(String groupId,
String artifactId,
VersionRange version)
Shorthand method for getArtifactFactory().createPluginArtifact(...). |
Set |
extractArtifacts(Collection mavenProjects)
Takes a List of MavenProject instances and converts it into a Set of Artifact instances. |
ArtifactFactory |
getArtifactFactory()
Returns the artifact factory to use. |
Log |
getLog()
Gets the logger used by this helper. |
Comparator |
getVersionComparator(Artifact artifact)
Returns the version comparator to use for the specified artifact. |
Comparator |
getVersionComparator(String groupId,
String artifactId)
Returns the version comparator to use for the specified groupId and artifactId. |
ArtifactVersions |
lookupArtifactVersions(Artifact artifact,
boolean usePluginRepositories)
Looks up the versions of the specified artifact that are available in either the local repository, or the appropriate remote repositories. |
| Method Detail |
|---|
Log getLog()
ArtifactVersions lookupArtifactVersions(Artifact artifact,
boolean usePluginRepositories)
throws MojoExecutionException
artifact - The artifact to look for versions of.usePluginRepositories - true will consult the pluginRepositories, while false
will consult the repositories for normal dependencies.
MojoExecutionException - When things go wrong.Comparator getVersionComparator(Artifact artifact)
artifact - the artifact.
Comparator getVersionComparator(String groupId,
String artifactId)
groupId - the groupId.artifactId - the artifactId.
ArtifactFactory getArtifactFactory()
Artifact createPluginArtifact(String groupId,
String artifactId,
VersionRange version)
getArtifactFactory().createPluginArtifact(...).
groupId - The group Id.artifactId - The artifact Id.version - The version range.
Artifact createDependencyArtifact(String groupId,
String artifactId,
VersionRange version,
String type,
String classifier,
String scope,
boolean optional)
getArtifactFactory().createDependencyArtifact(...).
groupId - The group id.artifactId - The artifact id.version - The version (possibly a range)type - The type.classifier - The classifier.scope - The scope.optional - If optional or not.
Artifact createDependencyArtifact(Dependency dependency)
throws InvalidVersionSpecificationException
getArtifactFactory().createDependencyArtifact(...) which extracts the
parameters from the Dependency instance.
dependency - The dependency to create the artifact for.
InvalidVersionSpecificationException - if the version specified in the dependency is invalid.Set extractArtifacts(Collection mavenProjects)
List of MavenProject instances and converts it into a Set of Artifact instances.
mavenProjects - the List of MavenProject instances.
Set of Artifact instances.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||