maven: Add more debug logging instruction

And log the metadata dictionary.
This commit is contained in:
Antoine R. Dumont (@ardumont) 2022-01-24 14:39:28 +01:00
parent f6ca1dc3dc
commit 8667b04abc
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8

View file

@ -229,12 +229,15 @@ class MavenLister(Lister[MavenListerState, RepoPage]):
if m_time is not None and url_src is not None:
time = m_time.group("mtime")
jar_src["time"] = int(time)
logger.debug(f"* Yielding jar {url_src}.")
yield {
artifact_metadata_d = {
"type": "maven",
"url": url_src,
**jar_src,
}
logger.debug(
"* Yielding jar %s: %s", url_src, artifact_metadata_d
)
yield artifact_metadata_d
url_src = None
logger.info(f"Found {len(out_pom)} poms.")
@ -251,14 +254,16 @@ class MavenLister(Lister[MavenListerState, RepoPage]):
scm = project["project"]["scm"]["connection"]
gid = project["project"]["groupId"]
aid = project["project"]["artifactId"]
yield {
artifact_metadata_d = {
"type": "scm",
"doc": out_pom[pom],
"url": scm,
"project": f"{gid}.{aid}",
}
logger.debug("* Yielding pom %s: %s", pom, artifact_metadata_d)
yield artifact_metadata_d
else:
logger.debug(f"No scm.connection in pom {pom}")
logger.debug("No scm.connection in pom %s", pom)
else:
logger.debug(f"No scm in pom {pom}")
except xmltodict.expat.ExpatError as error: