Class DependencyResolutionService

java.lang.Object
io.micronaut.maven.services.DependencyResolutionService

@Singleton public class DependencyResolutionService extends Object
Utility methods for performing dependency resolution.
  • Field Details

  • 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 resolve
      applyManagedDependencies - Whether to apply the managed dependencies of the project
      Returns:
      The resolution result
      Throws:
      org.eclipse.aether.resolution.DependencyResolutionException