protected Path download(Artifact artifact,Version version) throws IOException, IllegalStateException {
  try {
    String requestUrl=combinePaths(updateEndpoint,"/repository/public/download/" + artifact.getName() + "/"+ version);
    Path artifactDownloadDir=getDownloadDirectory(artifact,version);
    deleteDirectory(artifactDownloadDir.toFile());
    return transport.download(requestUrl,artifactDownloadDir,MediaType.APPLICATION_OCTET_STREAM);
  }
 catch (  IOException e) {
    throw getProperException(e,artifact);
  }
}

protected Path download ( Artifact artifact , Version version ) throws IOException , IllegalStateException { try { String requestUrl = combinePaths ( updateEndpoint , "/repository/public/download/" + artifact . getName ( ) + "/" + version ) ; Path artifactDownloadDir = getDownloadDirectory ( artifact , version ) ; deleteDirectory ( artifactDownloadDir . toFile ( ) ) ; return transport . download ( requestUrl , artifactDownloadDir , MediaType . APPLICATION_OCTET_STREAM ) ; } catch ( IOException e ) { throw getProperException ( e , artifact ) ; } }
download the specific version of the artifact .
