MCPcopy Create free account
hub / github.com/apache/solr / verifyDeployedPOMsCoordinates

Function verifyDeployedPOMsCoordinates

dev-tools/scripts/smokeTestRelease.py:947–967  ·  view source on GitHub ↗

verify that each POM's coordinate (drawn from its content) matches its filepath, and verify that the corresponding artifact exists.

(artifacts, version)

Source from the content-addressed store, hash-verified

945
946
947def verifyDeployedPOMsCoordinates(artifacts, version):
948 """
949 verify that each POM's coordinate (drawn from its content) matches
950 its filepath, and verify that the corresponding artifact exists.
951 """
952 print(" verify deployed POMs' coordinates...")
953 if 'SNAPSHOT' in version:
954 print(" (skipping filepath check for SNAPSHOT — timestamp paths differ from coordinate)")
955 return
956 for POM in [a for a in artifacts if a.endswith('.pom')]:
957 treeRoot = ET.parse(POM).getroot()
958 groupId, artifactId, packaging, POMversion = getPOMcoordinate(treeRoot)
959 POMpath = '%s/%s/%s/%s-%s.pom' \
960 % (groupId.replace('.', '/'), artifactId, version, artifactId, version)
961 if not POM.endswith(POMpath):
962 raise RuntimeError("Mismatch between POM coordinate %s:%s:%s and filepath: %s"
963 % (groupId, artifactId, POMversion, POM))
964 # Verify that the corresponding artifact exists
965 artifact = POM[:-3] + packaging
966 if artifact not in artifacts:
967 raise RuntimeError('Missing corresponding .%s artifact for POM %s' % (packaging, POM))
968
969
970def crawl(downloadedFiles, urlString, targetDir, exclusions=set()):

Callers 1

checkMavenFunction · 0.85

Calls 3

getPOMcoordinateFunction · 0.85
parseMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…