code: @Override
      public File resolveArtifact(String coordinates) throws ArtifactException
      {
          ArtifactRequest request = new ArtifactRequest();
          Artifact artifact = new DefaultArtifact(coordinates);
          request.setArtifact(artifact);
          request.setRepositories(remoteRepositories);
  
          log.debug(String.format("Resolving artifact %s from %s", artifact, remoteRepositories));
  
          ArtifactResult result;
          try
          {
              result = repositorySystem.resolveArtifact(repositorySession, request);
          }
          catch (ArtifactResolutionException e)
          {
              throw new ArtifactException(e.getMessage(), e);
          }
  
          log.debug(String.format("Resolved artifact %s to %s from %s",
                  artifact,
                  result.getArtifact().getFile(),
                  result.getRepository()));
  
          return result.getArtifact().getFile();
      }
docs: Resolves an Artifact from the repositories.
  
  @param coordinates The artifact coordinates
  @return The local file resolved/downloaded for the given coordinates
  @throws ArtifactException If the artifact cannot be resolved