Я хочу получить URL-адрес хранилища снимков из pom.xml с помощью скрипта Python. Попробовал следующий код, который работает для идентификатора артефакта, но не работает для URL:
import xml.etree as xml
ns = "http://maven.apache.org/POM/4.0.0"
et.register_namespace('', ns)
tree = et.ElementTree()
tree.parse('pom.xml')
pom = tree.parse('pom.xml')
for profile in pom.findall('//{http://maven.apache.org/POM/4.0.0}distr ... Management'):
print(repr(profile))
p = tree.getroot().find("{%s}artifactId" % ns)
Ниже приведен pom.xml:
4.0.0
KP
abc.org/
org.abc.cloud
sample_abc
1.1.0-SNAPSHOT
war
uc1
uc1
distributionManagement>
local-snapshot
snapShot
https://pqr/local-snapshot/
Подробнее здесь: https://stackoverflow.com/questions/785 ... -in-python