From 378613ad82fc00b6585d00afd1c814f3f7c5ccb6 Mon Sep 17 00:00:00 2001 From: Antoine Lambert Date: Fri, 29 Apr 2022 11:14:54 +0200 Subject: [PATCH] maven: Remove extraction of groupId and artifactId from pom files When parsing pom files, we are only interested to extract a VCS URL (git, hg, svn) in order to create associated loading tasks. In that case, the groupId and artifactId are not used by the lister so better removing their extraction, plus it will prevent errors when those info are missing in pom files. --- swh/lister/maven/lister.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/swh/lister/maven/lister.py b/swh/lister/maven/lister.py index 6485f03..80a17cb 100644 --- a/swh/lister/maven/lister.py +++ b/swh/lister/maven/lister.py @@ -252,14 +252,10 @@ class MavenLister(Lister[MavenListerState, RepoPage]): if scm_d is not None: connection = scm_d.get("connection") if connection is not None: - scm = connection - gid = project_d["groupId"] - aid = project_d["artifactId"] artifact_metadata_d = { "type": "scm", "doc": out_pom[pom], - "url": scm, - "project": f"{gid}.{aid}", + "url": connection, } logger.debug("* Yielding pom %s: %s", pom, artifact_metadata_d) yield artifact_metadata_d