com.buschmais.jqassistant.plugin.m2repo.impl.scanner

## Class ArtifactResolver

- java.lang.Object
- - com.buschmais.jqassistant.plugin.m2repo.impl.scanner.ArtifactResolver

-     public class ArtifactResolver
      extends Object

  Transfers artifacts from a remote repository to a local repository.
  Author:
    pherklotz

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArtifactResolver(URL repositoryUrl, File localDirectory)` Creates a new object.
    `ArtifactResolver(URL repositoryUrl, File localDirectory, String username, String password)` Creates a new object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<org.eclipse.aether.resolution.ArtifactResult>` | `downloadArtifact(org.eclipse.aether.artifact.Artifact artifact)` Resolves an artifact with the given properties and transfers it in a local repository.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ArtifactResolver

          public ArtifactResolver(URL repositoryUrl,
                                  File localDirectory)

      Creates a new object.
      Parameters:
        `repositoryUrl` - the repository url
        `localDirectory` - the directory for resolved artifacts

    - #### ArtifactResolver

          public ArtifactResolver(URL repositoryUrl,
                                  File localDirectory,
                                  String username,
                                  String password)

      Creates a new object.
      Parameters:
        `repositoryUrl` - the repository url
        `localDirectory` - the directory for resolved artifacts
        `username` - an username for authentication
        `password` - a password for authentication

  - ### Method Detail

    - #### downloadArtifact

          public List<org.eclipse.aether.resolution.ArtifactResult> downloadArtifact(org.eclipse.aether.artifact.Artifact artifact)
                                                                              throws org.eclipse.aether.resolution.ArtifactResolutionException

      Resolves an artifact with the given properties and transfers it in a local repository.
      Parameters:
        `artifact` - the artifact to resolve
      Returns:
        the local file handle
      Throws:
        `org.eclipse.aether.resolution.ArtifactResolutionException` - in case of a unresolvable artifacts

Copyright © 2015 buschmais GbR. All rights reserved.