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(AppArtifact artifact, String upToVersion, boolean inclusive)Returns the latest version for the artifact up to the version specified.StringgetLatestVersionFromRange(AppArtifact appArtifact, String range)Resolves the latest version from the specified range.StringgetNextVersion(AppArtifact artifact, String fromVersion, boolean fromVersionIncluded, String upToVersion, boolean upToVersionIncluded)Returns the next version of the artifact from the specified range.List<String>listLaterVersions(AppArtifact 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(AppArtifact appArtifact, Path localPath)(Re-)links an artifact to a path.Pathresolve(AppArtifact artifact)Resolves an artifact.AppModelresolveManagedModel(AppArtifact appArtifact, List<AppDependency> directDeps, AppArtifact managingProject, Set<AppArtifactKey> localProjects)AppModelresolveModel(AppArtifact artifact)Resolve dependencies that are required at runtime, excluding test and optional dependencies.AppModelresolveModel(AppArtifact root, List<AppDependency> deps)Resolve artifact dependencies given the specific versions of the direct dependenciesdefault List<AppDependency>resolveUserDependencies(AppArtifact artifact)Resolve application direct and transitive dependencies configured by the user.List<AppDependency>resolveUserDependencies(AppArtifact artifact, List<AppDependency> deps)Resolve application direct and transitive dependencies configured by the user, given the specific versions of the direct dependencies.
-
-
-
Method Detail
-
relink
void relink(AppArtifact appArtifact, Path localPath) throws AppModelResolverException
(Re-)links an artifact to a path.- Parameters:
appArtifact- an artifact to (re-)link to the pathlocalPath- local path to the artifact- Throws:
AppModelResolverException- in case of a failure
-
resolve
Path resolve(AppArtifact artifact) throws AppModelResolverException
Resolves an artifact.- Parameters:
artifact- artifact to resolve- Returns:
- local path
- Throws:
AppModelResolverException- in case of a failure
-
resolveUserDependencies
default List<AppDependency> resolveUserDependencies(AppArtifact 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
List<AppDependency> resolveUserDependencies(AppArtifact artifact, List<AppDependency> 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
AppModel resolveModel(AppArtifact artifact) throws AppModelResolverException
Resolve dependencies that are required at runtime, excluding test and optional dependencies.- Parameters:
artifact-- Returns:
- Throws:
AppModelResolverException
-
resolveModel
AppModel resolveModel(AppArtifact root, List<AppDependency> 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
AppModel resolveManagedModel(AppArtifact appArtifact, List<AppDependency> directDeps, AppArtifact managingProject, Set<AppArtifactKey> localProjects) throws AppModelResolverException
- Throws:
AppModelResolverException
-
listLaterVersions
List<String> listLaterVersions(AppArtifact 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(AppArtifact 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(AppArtifact 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(AppArtifact 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
-
-