|
|
|
@@ -49,15 +49,27 @@ class PackagePOM: |
|
|
|
root_copy.extend(depman.findall('*')) |
|
|
|
root_copy.remove(depman) |
|
|
|
|
|
|
|
tmpGroupId = f'tmp.{package.groupId}' |
|
|
|
tmpArtifactId = f'placeholder.{package.artifactId}' |
|
|
|
tmpVersion = package.version |
|
|
|
|
|
|
|
if (groupId := root_copy.find('groupId', ns)) is not None: |
|
|
|
groupId.text = f'tmp.{package.groupId}' |
|
|
|
groupId.text = tmpGroupId |
|
|
|
else: |
|
|
|
logger.info(f"{package}: Inserting new groupId tag in pom") |
|
|
|
ET.SubElement(root_copy, 'groupId').text = tmpGroupId |
|
|
|
|
|
|
|
if (artifactId := root_copy.find('artifactId', ns)) is not None: |
|
|
|
artifactId.text = tmpArtifactId |
|
|
|
else: |
|
|
|
logger.warning(f"{package}: No groupId tag in pom") |
|
|
|
logger.info(f"{package}: Inserting new artifactId tag in pom") |
|
|
|
ET.SubElement(root_copy, 'artifactId').text = tmpArtifactId |
|
|
|
|
|
|
|
if (artifactId := root_copy.find('groupId', ns)) is not None: |
|
|
|
artifactId.text = f'placeholder.{package.artifactId}' |
|
|
|
if (version := root_copy.find('version', ns)) is not None: |
|
|
|
version.text = tmpVersion |
|
|
|
else: |
|
|
|
logger.warning(f"{package}: No artifactId tag in pom") |
|
|
|
logger.info(f"{package}: Inserting new version tag in pom") |
|
|
|
ET.SubElement(root_copy, 'version').text = tmpVersion |
|
|
|
|
|
|
|
# Add a dependency for the pom itself |
|
|
|
if (dependencies := root_copy.find('dependencies', ns)) is not None: |
|
|
|
|