Interface AppModelResolver


public interface AppModelResolver
Application model resolver used to resolve application and/or its dependency artifacts.
Author:
Alexey Loubyansky
  • Method Details

    • relink

      void relink(ArtifactCoords artifact, Path localPath) throws AppModelResolverException
      (Re-)links an artifact to a path.
      Parameters:
      artifact - an artifact to (re-)link to the path
      localPath - local path to the artifact
      Throws:
      AppModelResolverException - in case of a failure
    • resolve

      Resolves an artifact.
      Parameters:
      artifact - artifact to resolve
      Returns:
      resolved artifact
      Throws:
      AppModelResolverException - in case of a failure
    • resolveUserDependencies

      default Collection<ResolvedDependency> resolveUserDependencies(ArtifactCoords artifact) throws AppModelResolverException
      Resolve application direct and transitive dependencies configured by the user. Note that deployment dependencies are not included in the result.
      Parameters:
      artifact - application artifact
      Returns:
      the list of dependencies configured by the user
      Throws:
      AppModelResolverException - in case of a failure
    • resolveUserDependencies

      Resolve application direct and transitive dependencies configured by the user, given the specific versions of the direct dependencies. Note that deployment dependencies are not included in the result.
      Parameters:
      artifact - application artifact
      deps - some or all of the direct dependencies that should be used in place of the original ones
      Returns:
      the list of dependencies configured by the user
      Throws:
      AppModelResolverException - in case of a failure
    • resolveModel

      Resolve dependencies that are required at runtime, excluding test and optional dependencies.
      Parameters:
      artifact -
      Returns:
      Throws:
      AppModelResolverException
    • resolveModel

      Resolve artifact dependencies given the specific versions of the direct dependencies
      Parameters:
      root - root artifact
      deps - some or all of the direct dependencies that should be used in place of the original ones
      Returns:
      collected dependencies
      Throws:
      AppModelResolverException - in case of a failure
    • resolveManagedModel

      ApplicationModel resolveManagedModel(ArtifactCoords appArtifact, Collection<Dependency> directDeps, Set<ArtifactKey> excludedArtifacts, ArtifactCoords managingProject, Set<ArtifactKey> localProjects) throws AppModelResolverException
      Resolve application model with dependency management.
      Parameters:
      appArtifact - application artifact
      directDeps - direct dependencies to force
      excludedArtifacts - artifacts to exclude
      managingProject - managing project coordinates
      localProjects - local workspace projects
      Returns:
      resolved application model
      Throws:
      AppModelResolverException - in case of a failure
    • listLaterVersions

      List<String> listLaterVersions(ArtifactCoords artifact, String upToVersion, boolean inclusive) throws AppModelResolverException
      Lists versions released later than the version of the artifact up to the version specified or all the later versions in case the up-to-version is not provided.
      Parameters:
      artifact - artifact to list the versions for
      Returns:
      the list of versions released later than the version of the artifact
      Throws:
      AppModelResolverException - in case of a failure
    • getNextVersion

      String getNextVersion(ArtifactCoords artifact, String fromVersion, boolean fromVersionIncluded, String upToVersion, boolean upToVersionIncluded) throws AppModelResolverException
      Returns the next version of the artifact from the specified range. In case the next version is not available, the method returns null.
      Parameters:
      artifact - artifact
      fromVersion - the lowest version of the range
      fromVersionIncluded - whether the specified lowest version should be included in the range
      upToVersion - the highest version of the range
      upToVersionIncluded - whether the specified highest version should be included in the range
      Returns:
      the next version from the specified range or null if the next version is not available
      Throws:
      AppModelResolverException - in case of a failure
    • getLatestVersion

      String getLatestVersion(ArtifactCoords artifact, String upToVersion, boolean inclusive) throws AppModelResolverException
      Returns the latest version for the artifact up to the version specified. In case there is no later version available, the artifact's version is returned.
      Parameters:
      artifact - artifact
      upToVersion - max version boundary
      inclusive - whether the upToVersion should be included in the range or not
      Returns:
      the latest version up to specified boundary
      Throws:
      AppModelResolverException - in case of a failure
    • getLatestVersionFromRange

      String getLatestVersionFromRange(ArtifactCoords appArtifact, String range) throws AppModelResolverException
      Resolves the latest version from the specified range. The version of the artifact is ignored.
      Parameters:
      appArtifact - the artifact
      range - the version range
      Returns:
      the latest version of the artifact from the range or null, if no version was found for the specified range
      Throws:
      AppModelResolverException - in case of a failure