try {
String remotePomPath = remoteRepository + artifactRelativeHttpPath + ".pom";
downloadFile(coordinates + ":" + packaging, remotePomPath, pomFile);
if (pomFile.exists()) {
return pomFile;
timestampedArtifactRelativePath = coordinates.relativeArtifactPath('/', downloadTimestampVersion(coordinates + ":" + packaging, remoteMetadataPath));
String remotePomPath = remoteRepository + timestampedArtifactRelativePath + ".pom";
downloadFile(coordinates + ":" + packaging, remotePomPath, pomFile);
if (pomFile.exists()) {
return pomFile;
String remotePomPath = remoteRepository + artifactRelativeHttpPath + ".pom";
String remoteArtifactPath = remoteRepository + artifactRelativeHttpPath + classifier + "." + packaging;
downloadFile(coordinates + ":pom", remotePomPath, pomFile);
if (!pomFile.exists()) {
downloadFile(coordinates + ":" + packaging, remoteArtifactPath, artifactFile);
if (artifactFile.exists()) {
return artifactFile;
String remotePomPath = remoteRepository + timestampedArtifactRelativePath + ".pom";
String remoteArtifactPath = remoteRepository + timestampedArtifactRelativePath + classifier + "." + packaging;
downloadFile(coordinates + ":pom", remotePomPath, pomFile);
if (!pomFile.exists()) {
downloadFile(coordinates + ":" + packaging, remoteArtifactPath, artifactFile);
if (artifactFile.exists()) {
return artifactFile;