Interface MavenVersionResolver
public interface MavenVersionResolver
A
MavenVersionResolver is used to resolve the versions of managed dependencies
or plugins. Implementations must be thread-safe.- Author:
- Andy Wilkinson, Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionresolveDependencies(String groupId, String artifactId, String version) Resolves the versions in the managed dependencies of the bom identified by the givengroupId,artifactId, andversion.resolvePlugins(String groupId, String artifactId, String version) Resolves the versions in the managed plugins of the pom identified by the givengroupId,artifactId, andversion.static MavenVersionResolverwithCacheLocation(Path location) Creates a newMavenVersionResolverthat uses the givenlocationfor its local cache.
-
Method Details
-
resolveDependencies
Resolves the versions in the managed dependencies of the bom identified by the givengroupId,artifactId, andversion.- Parameters:
groupId- bom group IDartifactId- bom artifact IDversion- bom version- Returns:
- the managed dependencies as a map of
groupId:artifactIdtoversion
-
resolvePlugins
Resolves the versions in the managed plugins of the pom identified by the givengroupId,artifactId, andversion.- Parameters:
groupId- pom group IDartifactId- pom artifact IDversion- pom version- Returns:
- the managed plugins as a map of
groupId:artifactIdtoversion
-
withCacheLocation
Creates a newMavenVersionResolverthat uses the givenlocationfor its local cache. To avoid multiple instances attempting to write to the same location cache, callers should ensure that a unique location is used. The returned resolver can then be used concurrently by multiple threads.- Parameters:
location- cache location- Returns:
- the resolver
-