maven: Pass the base URL of the Maven instance to the loader

I would like to use it as the metadata authority URI in the loader,
instead of '{p_url.scheme}://{p_url.netloc}/', which I do not think
is accurate, as it is possible to have multiple Maven instances at
the same netloc.
This commit is contained in:
Valentin Lorentz 2021-12-07 13:51:00 +01:00
parent 15fa84cf7e
commit fa7ecc8fbd
2 changed files with 2 additions and 0 deletions

View file

@ -302,6 +302,7 @@ class MavenLister(Lister[MavenListerState, RepoPage]):
"gid": page["gid"],
"aid": page["aid"],
"version": page["version"],
"base_url": self.BASE_URL,
}
]
},

View file

@ -122,6 +122,7 @@ def test_maven_full_listing(
assert src.get("gid") == artifact["gid"]
assert src.get("aid") == artifact["aid"]
assert src.get("version") == artifact["version"]
assert MVN_URL == artifact["base_url"]
break
else:
raise AssertionError