gnodet-bot commented on code in PR #14089:
URL: https://github.com/apache/maven/pull/14089#discussion_r4654259688
##########
impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactManager.java:
##########
@@ -123,6 +127,14 @@ private String id(org.apache.maven.artifact.Artifact
artifact) {
+ ":" + artifact.getVersion();
}
+ /**
+ * The id of the project's POM artifact, as {@link
#id(org.apache.maven.artifact.Artifact)} computes it for
+ * {@link org.apache.maven.project.artifact.ProjectArtifact}: extension
{@code pom}, no classifier.
+ */
+ private String pomId(MavenProject project) {
+ return project.getGroupId() + ":" + project.getArtifactId() + ":pom:"
+ project.getVersion();
Review Comment:
💡 **Minor suggestion:** `pomId()` duplicates the format-string logic from
`id(org.apache.maven.artifact.Artifact)`. Consider delegating to avoid the
coupling — e.g. construct a `ProjectArtifact` and call `id()` on it, or extract
the shared format into a helper. That said, the Javadoc makes the relationship
explicit, so this is low-priority.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]