diff --git a/minecode/visitors/maven.py b/minecode/visitors/maven.py index 023f672a..a662aa14 100644 --- a/minecode/visitors/maven.py +++ b/minecode/visitors/maven.py @@ -302,11 +302,17 @@ def map_maven_package(package_url, package_content): ancestor_pom_texts=ancestor_pom_texts, package=package ) + if "repository_url" in package_url.qualifiers: + base_url = package_url.qualifiers["repository_url"] + else: + base_url = 'https://repo1.maven.org/maven2' + urls = get_urls( namespace=package_url.namespace, name=package_url.name, version=package_url.version, - qualifiers=package_url.qualifiers + qualifiers=package_url.qualifiers, + base_url=base_url, ) # In the case of looking up a maven package with qualifiers of # `classifiers=sources`, the purl of the package created from the pom does