This message was deleted.
# community-support
s
This message was deleted.
we do this as we also use dynamic version, in combination with dependency locking. As an added clean up measure, we remove dependencyManagement from the pom file, as it doesn’t necessarily line up with the resolved versions. we define this inside a plugin, so this is java code:
Copy code
// we publish a pom using the resolved versions, so no need to include dependencyManagement here
								((MavenPublication) publication).getPom().withXml(xml -> {
									Node root = xml.asNode();
									NodeList dependencyManagement = (NodeList) root.get("dependencyManagement");
									if (!dependencyManagement.isEmpty()) {
										dependencyManagement.forEach(node -> root.remove((Node) node));
									}
								});
v
It's bad practice to publish dynamic versions anyway.
r
Thank you all
👌 1