Package io.micronaut.maven.services
Class DependencyResolutionService
java.lang.Object
io.micronaut.maven.services.DependencyResolutionService
Utility methods for performing dependency resolution.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDependencyResolutionService
(org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.project.MavenProject mavenProject, org.eclipse.aether.RepositorySystem repositorySystem) -
Method Summary
Modifier and TypeMethodDescriptionList<org.eclipse.aether.resolution.ArtifactResult>
artifactResultsFor
(Stream<org.eclipse.aether.artifact.Artifact> artifacts, boolean applyManagedDependencies) Performs a dependency request to compute the transitive dependencies of the given artifacts.static org.eclipse.aether.artifact.Artifact
mavenDependencyToAetherArtifact
(org.apache.maven.model.Dependency d) static org.eclipse.aether.graph.Dependency
mavenDependencyToAetherDependency
(org.apache.maven.model.Dependency d) static io.micronaut.testresources.buildtools.MavenDependency
mavenDependencyToTestResourcesDependency
(org.apache.maven.model.Dependency d) static org.eclipse.aether.artifact.Artifact
testResourcesDependencyToAetherArtifact
(io.micronaut.testresources.buildtools.MavenDependency d) toClasspath
(List<org.eclipse.aether.resolution.ArtifactResult> resolutionResult) toClasspathFiles
(List<org.eclipse.aether.resolution.ArtifactResult> resolutionResult)
-
Field Details
-
TEST_RESOURCES_GROUP
- See Also:
-
TEST_RESOURCES_ARTIFACT_ID_PREFIX
- See Also:
-
-
Constructor Details
-
DependencyResolutionService
@Inject public DependencyResolutionService(org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.project.MavenProject mavenProject, org.eclipse.aether.RepositorySystem repositorySystem)
-
-
Method Details
-
toClasspath
public static List<String> toClasspath(List<org.eclipse.aether.resolution.ArtifactResult> resolutionResult) -
toClasspathFiles
public static List<File> toClasspathFiles(List<org.eclipse.aether.resolution.ArtifactResult> resolutionResult) -
mavenDependencyToAetherDependency
public static org.eclipse.aether.graph.Dependency mavenDependencyToAetherDependency(org.apache.maven.model.Dependency d) -
mavenDependencyToAetherArtifact
public static org.eclipse.aether.artifact.Artifact mavenDependencyToAetherArtifact(org.apache.maven.model.Dependency d) -
mavenDependencyToTestResourcesDependency
public static io.micronaut.testresources.buildtools.MavenDependency mavenDependencyToTestResourcesDependency(org.apache.maven.model.Dependency d) -
testResourcesDependencyToAetherArtifact
public static org.eclipse.aether.artifact.Artifact testResourcesDependencyToAetherArtifact(io.micronaut.testresources.buildtools.MavenDependency d) -
artifactResultsFor
public List<org.eclipse.aether.resolution.ArtifactResult> artifactResultsFor(Stream<org.eclipse.aether.artifact.Artifact> artifacts, boolean applyManagedDependencies) throws org.eclipse.aether.resolution.DependencyResolutionException Performs a dependency request to compute the transitive dependencies of the given artifacts.- Parameters:
artifacts
- The artifacts to resolveapplyManagedDependencies
- Whether to apply the managed dependencies of the project- Returns:
- The resolution result
- Throws:
org.eclipse.aether.resolution.DependencyResolutionException
-