Package io.quarkus.bootstrap.resolver
Interface AppModelResolver
-
public interface AppModelResolverApplication model resolver used to resolve application and/or its dependency artifacts.- Author:
- Alexey Loubyansky
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringgetLatestVersion(ArtifactCoords artifact, String upToVersion, boolean inclusive)Returns the latest version for the artifact up to the version specified.StringgetLatestVersionFromRange(ArtifactCoords appArtifact, String range)Resolves the latest version from the specified range.StringgetNextVersion(ArtifactCoords artifact, String fromVersion, boolean fromVersionIncluded, String upToVersion, boolean upToVersionIncluded)Returns the next version of the artifact from the specified range.List<String>listLaterVersions(ArtifactCoords artifact, String upToVersion, boolean inclusive)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.voidrelink(ArtifactCoords artifact, Path localPath)(Re-)links an artifact to a path.ResolvedDependencyresolve(ArtifactCoords artifact)Resolves an artifact.ApplicationModelresolveManagedModel(ArtifactCoords appArtifact, Collection<Dependency> directDeps, ArtifactCoords managingProject, Set<ArtifactKey> localProjects)ApplicationModelresolveModel(ArtifactCoords artifact)Resolve dependencies that are required at runtime, excluding test and optional dependencies.ApplicationModelresolveModel(ArtifactCoords root, Collection<Dependency> deps)Resolve artifact dependencies given the specific versions of the direct dependenciesdefault Collection<ResolvedDependency>resolveUserDependencies(ArtifactCoords artifact)Resolve application direct and transitive dependencies configured by the user.Collection<ResolvedDependency>resolveUserDependencies(ArtifactCoords artifact, Collection<Dependency> deps)Resolve application direct and transitive dependencies configured by the user, given the specific versions of the direct dependencies.
-
-
-
Method Detail
-
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 pathlocalPath- local path to the artifact- Throws:
AppModelResolverException- in case of a failure
-
resolve
ResolvedDependency resolve(ArtifactCoords artifact) throws AppModelResolverException
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
Collection<ResolvedDependency> resolveUserDependencies(ArtifactCoords artifact, Collection<Dependency> deps) throws AppModelResolverException
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 artifactdeps- 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
ApplicationModel resolveModel(ArtifactCoords artifact) throws AppModelResolverException
Resolve dependencies that are required at runtime, excluding test and optional dependencies.- Parameters:
artifact-- Returns:
- Throws:
AppModelResolverException
-
resolveModel
ApplicationModel resolveModel(ArtifactCoords root, Collection<Dependency> deps) throws AppModelResolverException
Resolve artifact dependencies given the specific versions of the direct dependencies- Parameters:
root- root artifactdeps- 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, ArtifactCoords managingProject, Set<ArtifactKey> localProjects) throws AppModelResolverException
- Throws:
AppModelResolverException
-
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- artifactfromVersion- the lowest version of the rangefromVersionIncluded- whether the specified lowest version should be included in the rangeupToVersion- the highest version of the rangeupToVersionIncluded- 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- artifactupToVersion- max version boundaryinclusive- 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 artifactrange- 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
-
-