diff --git a/lib/maven.defs b/lib/maven.defs index 67dad4ea76..d517de725f 100644 --- a/lib/maven.defs +++ b/lib/maven.defs @@ -48,6 +48,12 @@ def maven_jar( raise NameError('expected id="groupId:artifactId:version"') group, artifact, version = parts + # SNAPSHOT artifacts are handled differently on Google storage bucket: + # 'SNAPSHOT' is discarded from the directory name. However on other + # Maven repositories, most notable local repository located in + # ~/.m2/repository (and is supported through MAVEN_LOCAL repository) + # it must be preserved, otherwise the artifact wouldn't be found. + # Atm the SNAPSHOT part is only discarded for Google storage bucket. if 'SNAPSHOT' in version and repository.startswith(GERRIT): file_version = version.replace('-SNAPSHOT', '') version = version.split('-SNAPSHOT')[0] + '-SNAPSHOT'