Package org.apache.maven.api.services
Interface DependencyResolverRequest
- All Superinterfaces:
RepositoryAwareRequest,Request<Session>
A request to collect the transitive dependencies and to build a dependency graph from them. There are three ways to
create a dependency graph. First, only the root dependency can be given. Second, a root dependency and direct
dependencies can be specified in which case the specified direct dependencies are merged with the direct dependencies
retrieved from the artifact descriptor of the root dependency. And last, only direct dependencies can be specified in
which case the root node of the resulting graph has no associated dependency.
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic enum -
Method Summary
Modifier and TypeMethodDescriptionstatic DependencyResolverRequestbuild(Session session, DependencyResolverRequest.RequestType requestType, List<DependencyCoordinates> dependencies) static DependencyResolverRequestbuild(Session session, DependencyResolverRequest.RequestType requestType, List<DependencyCoordinates> dependencies, PathScope scope) static DependencyResolverRequestbuild(Session session, DependencyResolverRequest.RequestType requestType, Artifact rootArtifact) static DependencyResolverRequestbuild(Session session, DependencyResolverRequest.RequestType requestType, Artifact rootArtifact, PathScope scope) static DependencyResolverRequestbuild(Session session, DependencyResolverRequest.RequestType requestType, DependencyCoordinates dependency) static DependencyResolverRequestbuild(Session session, DependencyResolverRequest.RequestType requestType, DependencyCoordinates dependency, PathScope scope) static DependencyResolverRequestbuild(Session session, DependencyResolverRequest.RequestType requestType, Project project) static DependencyResolverRequestbuild(Session session, DependencyResolverRequest.RequestType requestType, Project project, PathScope scope) builder()Returns a filter for the types of path (class-path, module-path, …) accepted by the tool.getRoot()Returns the version of the platform where the code will be executed.booleanMethods inherited from interface org.apache.maven.api.services.RepositoryAwareRequest
getRepositories, validate
-
Method Details
-
getRequestType
-
getProject
-
getRootArtifact
-
getRoot
-
getDependencies
-
getManagedDependencies
-
getVerbose
boolean getVerbose() -
getPathScope
-
getPathTypeFilter
Returns a filter for the types of path (class-path, module-path, …) accepted by the tool. For example, if a Java tools accepts only class-path elements, then the filter should returntrueforJavaPathType.CLASSESandfalseforJavaPathType.MODULES. If no filter is explicitly set, then the default is a filter accepting everything.- Returns:
- a filter for the types of path (class-path, module-path, …) accepted by the tool
-
getTargetVersion
Returns the version of the platform where the code will be executed. It should be the highest value of the<targetVersion>elements inside the<source>elements of a POM file.Application to Java
In the context of a Java project, this is the value given to the--releasecompiler option. This value can determine whether a dependency will be placed on the class-path or on the module-path. For example, if themodule-info.classentry of a JAR file exists only in theMETA-INF/versions/17/sub-directory, then the default location of that dependency will be the module-path only if the--releaseoption is equal or greater than 17.If this value is not provided, then the default value in the context of Java projects is the Java version on which Maven is running, as given by
Runtime.version().- Returns:
- version of the platform where the code will be executed, or
nullfor default - See Also:
-
builder
-
build
@Nonnull static DependencyResolverRequest build(Session session, DependencyResolverRequest.RequestType requestType, Artifact rootArtifact) -
build
@Nonnull static DependencyResolverRequest build(Session session, DependencyResolverRequest.RequestType requestType, Artifact rootArtifact, PathScope scope) -
build
@Nonnull static DependencyResolverRequest build(Session session, DependencyResolverRequest.RequestType requestType, Project project) -
build
@Nonnull static DependencyResolverRequest build(Session session, DependencyResolverRequest.RequestType requestType, Project project, PathScope scope) -
build
@Nonnull static DependencyResolverRequest build(Session session, DependencyResolverRequest.RequestType requestType, DependencyCoordinates dependency) -
build
@Nonnull static DependencyResolverRequest build(Session session, DependencyResolverRequest.RequestType requestType, DependencyCoordinates dependency, PathScope scope) -
build
@Nonnull static DependencyResolverRequest build(Session session, DependencyResolverRequest.RequestType requestType, List<DependencyCoordinates> dependencies) -
build
@Nonnull static DependencyResolverRequest build(Session session, DependencyResolverRequest.RequestType requestType, List<DependencyCoordinates> dependencies, PathScope scope)
-