|
|
@ -202,7 +202,10 @@ class MavenDownloader:
|
|
|
|
buildNumber = xml.xpath("/metadata/versioning/snapshot/buildNumber/text()")[0]
|
|
|
|
buildNumber = xml.xpath("/metadata/versioning/snapshot/buildNumber/text()")[0]
|
|
|
|
return self._uri_for_artifact(artifact, artifact.version.replace("SNAPSHOT", timestamp + "-" + buildNumber))
|
|
|
|
return self._uri_for_artifact(artifact, artifact.version.replace("SNAPSHOT", timestamp + "-" + buildNumber))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return self._uri_for_artifact(artifact)
|
|
|
|
if artifact.version == "latest":
|
|
|
|
|
|
|
|
artifact.version = self._find_latest_version_available(artifact)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return self._uri_for_artifact(artifact, artifact.version)
|
|
|
|
|
|
|
|
|
|
|
|
def _uri_for_artifact(self, artifact, version=None):
|
|
|
|
def _uri_for_artifact(self, artifact, version=None):
|
|
|
|
if artifact.is_snapshot() and not version:
|
|
|
|
if artifact.is_snapshot() and not version:
|
|
|
@ -331,10 +334,7 @@ def main():
|
|
|
|
prev_state = "absent"
|
|
|
|
prev_state = "absent"
|
|
|
|
if os.path.isdir(dest):
|
|
|
|
if os.path.isdir(dest):
|
|
|
|
dest = dest + "/" + artifact_id + "-" + version + "." + extension
|
|
|
|
dest = dest + "/" + artifact_id + "-" + version + "." + extension
|
|
|
|
if os.path.lexists(dest):
|
|
|
|
if os.path.lexists(dest) and downloader.verify_md5(dest, downloader.find_uri_for_artifact(artifact) + '.md5'):
|
|
|
|
if not artifact.is_snapshot():
|
|
|
|
|
|
|
|
prev_state = "present"
|
|
|
|
|
|
|
|
elif downloader.verify_md5(dest, downloader.find_uri_for_artifact(artifact) + '.md5'):
|
|
|
|
|
|
|
|
prev_state = "present"
|
|
|
|
prev_state = "present"
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
path = os.path.dirname(dest)
|
|
|
|
path = os.path.dirname(dest)
|
|
|
|