public interface VersionsHelper
| Modifier and Type | Method and Description |
|---|---|
org.apache.maven.artifact.versioning.ArtifactVersion |
createArtifactVersion(String version)
Creates an
ArtifactVersion instance from a string. |
org.apache.maven.artifact.Artifact |
createDependencyArtifact(org.apache.maven.model.Dependency dependency)
Shorthand method for
repositorySystem.createDependencyArtifact(...) which extracts the
parameters from the Dependency instance. |
org.apache.maven.artifact.Artifact |
createDependencyArtifact(String groupId,
String artifactId,
String version,
String type,
String classifier,
String scope)
Shorthand method for
getArtifactFactory().createDependencyArtifact(...). |
org.apache.maven.artifact.Artifact |
createDependencyArtifact(String groupId,
String artifactId,
String version,
String type,
String classifier,
String scope,
boolean optional)
Shorthand method for
repositorySystem.createDependencyArtifact(...). |
org.apache.maven.artifact.Artifact |
createPluginArtifact(String groupId,
String artifactId,
String version)
Shorthand method for
repositorySystem.createPluginArtifact(...). |
Set<org.apache.maven.artifact.Artifact> |
extractArtifacts(Collection<org.apache.maven.project.MavenProject> mavenProjects)
|
org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator |
getExpressionEvaluator(org.apache.maven.project.MavenProject project)
Returns an
ExpressionEvaluator for the specified project. |
org.apache.maven.plugin.logging.Log |
getLog()
Gets the logger used by this helper.
|
VersionComparator |
getVersionComparator(org.apache.maven.artifact.Artifact artifact)
Returns the version comparator to use for the specified artifact.
|
VersionComparator |
getVersionComparator(String groupId,
String artifactId)
Returns the version comparator to use for the specified groupId and artifactId.
|
Map<Property,PropertyVersions> |
getVersionPropertiesMap(org.apache.maven.project.MavenProject project,
Property[] propertyDefinitions,
String includeProperties,
String excludeProperties,
boolean autoLinkItems)
Returns a map of
PropertyVersions values keyed by
Property instances consisting of the properties defined in the project which
are associated with version information. |
ArtifactVersions |
lookupArtifactVersions(org.apache.maven.artifact.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.
|
Map<org.apache.maven.model.Dependency,ArtifactVersions> |
lookupDependenciesUpdates(Set<org.apache.maven.model.Dependency> dependencies,
boolean usePluginRepositories)
Looks up the updates for a set of dependencies.
|
ArtifactVersions |
lookupDependencyUpdates(org.apache.maven.model.Dependency dependency,
boolean usePluginRepositories)
Creates an
ArtifactVersions instance from a dependency. |
Map<org.apache.maven.model.Plugin,PluginUpdatesDetails> |
lookupPluginsUpdates(Set<org.apache.maven.model.Plugin> plugins,
boolean allowSnapshots)
Looks up the updates for a set of plugins.
|
PluginUpdatesDetails |
lookupPluginUpdates(org.apache.maven.model.Plugin plugin,
boolean allowSnapshots)
Looks up the updates for a plugin.
|
void |
resolveArtifact(org.apache.maven.artifact.Artifact artifact,
boolean usePluginRepositories)
Attempts to resolve the artifact.
|
org.apache.maven.plugin.logging.Log getLog()
VersionComparator getVersionComparator(org.apache.maven.artifact.Artifact artifact)
artifact - the artifact.VersionComparator getVersionComparator(String groupId, String artifactId)
groupId - the groupId.artifactId - the artifactId.org.apache.maven.artifact.Artifact createPluginArtifact(String groupId, String artifactId, String version)
repositorySystem.createPluginArtifact(...).groupId - The group Id.artifactId - The artifact Id.version - The version range.org.apache.maven.artifact.Artifact createDependencyArtifact(String groupId, String artifactId, String version, String type, String classifier, String scope, boolean optional)
repositorySystem.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.org.apache.maven.artifact.Artifact createDependencyArtifact(String groupId, String artifactId, String version, String type, String classifier, String scope)
getArtifactFactory().createDependencyArtifact(...).groupId - The group id.artifactId - The artifact id.version - The version.type - The type.classifier - The classifier.scope - The scope.org.apache.maven.artifact.Artifact createDependencyArtifact(org.apache.maven.model.Dependency dependency)
repositorySystem.createDependencyArtifact(...) which extracts the
parameters from the Dependency instance.dependency - The dependency to create the artifact for.Set<org.apache.maven.artifact.Artifact> extractArtifacts(Collection<org.apache.maven.project.MavenProject> mavenProjects)
org.apache.maven.artifact.versioning.ArtifactVersion createArtifactVersion(String version)
ArtifactVersion instance from a string.version - the string representation of the version.ArtifactVersions lookupArtifactVersions(org.apache.maven.artifact.Artifact artifact, boolean usePluginRepositories) throws org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
artifact - The artifact to look for versions of.usePluginRepositories - true will consult the pluginRepositories, while false will
consult the repositories for normal dependencies.org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException - When things go wrong.Map<org.apache.maven.model.Dependency,ArtifactVersions> lookupDependenciesUpdates(Set<org.apache.maven.model.Dependency> dependencies, boolean usePluginRepositories) throws org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
dependencies - The set of Dependency instances to look up.usePluginRepositories - Search the plugin repositories.ArtifactVersions.org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException - When things go wrong.ArtifactVersions lookupDependencyUpdates(org.apache.maven.model.Dependency dependency, boolean usePluginRepositories) throws org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
ArtifactVersions instance from a dependency.dependency - The dependency.usePluginRepositories - Search the plugin repositories.org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException - When things go wrong.Map<org.apache.maven.model.Plugin,PluginUpdatesDetails> lookupPluginsUpdates(Set<org.apache.maven.model.Plugin> plugins, boolean allowSnapshots) throws org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
plugins - The set of Plugin instances to look up.allowSnapshots - Include snapshots in the list of updates.PluginUpdatesDetails.org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException - When things go wrong.PluginUpdatesDetails lookupPluginUpdates(org.apache.maven.model.Plugin plugin, boolean allowSnapshots) throws org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
plugin - The Plugin instance to look up.allowSnapshots - Include snapshots in the list of updates.org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException - When things go wrong.org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator getExpressionEvaluator(org.apache.maven.project.MavenProject project)
ExpressionEvaluator for the specified project.project - The project.ExpressionEvaluator for the specified project.Map<Property,PropertyVersions> getVersionPropertiesMap(org.apache.maven.project.MavenProject project, Property[] propertyDefinitions, String includeProperties, String excludeProperties, boolean autoLinkItems) throws org.apache.maven.plugin.MojoExecutionException
PropertyVersions values keyed by
Property instances consisting of the properties defined in the project which
are associated with version information.project - The project.propertyDefinitions - Any extra hints about properties.includeProperties - A comma separated list of properties to include.excludeProperties - A comma separated list of properties to exclude.autoLinkItems - whether to automatically infer associationsPropertyVersions values keyed by
Property instances.org.apache.maven.plugin.MojoExecutionException - if something goes wrong.void resolveArtifact(org.apache.maven.artifact.Artifact artifact,
boolean usePluginRepositories)
throws org.apache.maven.artifact.resolver.ArtifactResolutionException,
org.apache.maven.artifact.resolver.ArtifactNotFoundException
artifact - The artifact to resolve.usePluginRepositories - whether to resolve from the plugin repositories or the regular repositories.org.apache.maven.artifact.resolver.ArtifactResolutionException - if something goes wrong.org.apache.maven.artifact.resolver.ArtifactNotFoundException - if something goes wrong.Copyright © 2008–2022 MojoHaus. All rights reserved.