diff --git a/swh/lister/maven/lister.py b/swh/lister/maven/lister.py --- a/swh/lister/maven/lister.py +++ b/swh/lister/maven/lister.py @@ -141,7 +141,7 @@ # ] # Download the main text index file. - logger.info(f"Downloading text index from {self.INDEX_URL}.") + logger.info("Downloading text index from %s.", self.INDEX_URL) assert self.INDEX_URL is not None response = requests.get(self.INDEX_URL, stream=True) response.raise_for_status() @@ -229,15 +229,18 @@ 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.") + logger.info("Found %s poms.", len(out_pom)) # Now fetch pom files and scan them for scm info. @@ -251,18 +254,20 @@ 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}") + logger.debug("No scm in pom %s", pom) except xmltodict.expat.ExpatError as error: - logger.info(f"Could not parse POM {pom} XML: {error}. Next.") + logger.info("Could not parse POM %s XML: %s. Next.", pom, error) def get_origins_from_page(self, page: RepoPage) -> Iterator[ListedOrigin]: """Convert a page of Maven repositories into a list of ListedOrigins.