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 Details

    • resolveDependencies

      Map<String,String> resolveDependencies(String groupId, String artifactId, String version)
      Resolves the versions in the managed dependencies of the bom identified by the given groupId, artifactId, and version.
      Parameters:
      groupId - bom group ID
      artifactId - bom artifact ID
      version - bom version
      Returns:
      the managed dependencies as a map of groupId:artifactId to version
    • resolvePlugins

      Map<String,String> resolvePlugins(String groupId, String artifactId, String version)
      Resolves the versions in the managed plugins of the pom identified by the given groupId, artifactId, and version.
      Parameters:
      groupId - pom group ID
      artifactId - pom artifact ID
      version - pom version
      Returns:
      the managed plugins as a map of groupId:artifactId to version
    • withCacheLocation

      static MavenVersionResolver withCacheLocation(Path location)
      Creates a new MavenVersionResolver that uses the given location for 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