elharo commented on code in PR #1193:
URL: https://github.com/apache/maven/pull/1193#discussion_r1250755633
##########
maven-artifact/src/main/java/org/apache/maven/artifact/handler/ArtifactHandler.java:
##########
@@ -41,7 +42,7 @@ public interface ArtifactHandler {
String getDirectory();
/**
- * Get the classifier associated to the dependency type.
+ * Returns the classifier of the dependency.
Review Comment:
I'm not sure there is such a thing as a "dependency type" and I'd prefer to
avoid that term completely. If it's confusing us, it will certainly confuse end
users. I think there are three things in play here:
1. The binary artifact served from the repository, such as a jar file, a
signature file, or a pom.xml file
2. The pom.xml for the artifact. For a jar file this is the pom.xml from
which the jar was built, though I'm not sure this is meaningful for anything
but the regular jar containing .class files. I'm not sure if it makes sense for
javadoc or source jars or non-jars. This is the pom found in the same directory
as the jar.
3. The pom.xml that imports the artifact using a dependency element.
This dependency can declare a different packaging and other properties of
the artifact.
So does ArtifactHandler report number 3 or number 2 if both are present? Or
does the answer to this question depend on which property we're looking at?
##########
maven-artifact/src/main/java/org/apache/maven/artifact/handler/ArtifactHandler.java:
##########
@@ -41,7 +42,7 @@ public interface ArtifactHandler {
String getDirectory();
/**
- * Get the classifier associated to the dependency type.
+ * Returns the classifier of the dependency.
Review Comment:
so this is the classifier from the artifact's own pom.xml?
##########
maven-artifact/src/main/java/org/apache/maven/artifact/handler/ArtifactHandler.java:
##########
@@ -19,7 +19,7 @@
package org.apache.maven.artifact.handler;
/**
- * An artifact handler defines for a dependency type, defined as Plexus
role:<ul>
+ * An artifact handler provides metadata for an artifact derived from the
dependency element that references the artifact:<ul>
* <li>extension and classifier, to be able to download the file,</li>
Review Comment:
Does this always provide the info from the artifact's own pom.xml?
I'm a little confused because if the classifier is used to download the file
as seen in the first bullet point then it has to come from the dependency
element that loads the artifact, not the artifact's own pom.xml. Maybe the
first bullet point is wrong?
--
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]