cstamas commented on code in PR #1391:
URL: https://github.com/apache/maven/pull/1391#discussion_r1466313211


##########
api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java:
##########
@@ -105,6 +105,14 @@ default String key() {
      */
     boolean isSnapshot();
 
+    /**
+     * The artifact properties.
+     *
+     * @return the artifact properties, never {@code null}
+     */
+    @Nonnull
+    ArtifactProperties getArtifactProperties();

Review Comment:
   Resolver also encodes "type" in Artifact#properties. It also exposed since 
eons ctors for DefaultArtifact where you could pass in ArtifactType. The type 
you declare (i.e. if in project, you have packaging -> type) or if "ad-hoc" by 
root dependency node type (where callar knows what it does).
   
   Or in short:
   * artifact is a file decorated with coordinates and properties
   * dependency is an artifact having extras like scope, type, optionality 
using which you can "derive" an artifact as above
   * true, in Resolver "dependency" is ONLY a thing that comes from POM 
(ArtifactDescriptor) but it is being distilled to artifact (as in second bullet 
-> first bullet).
   
   Basically "everything is an artifact", and "dependency is an artifact that 
enters the game as dependency". This is how Resolver abstracts. 
   
   Doing collect+resolve operation and ending up with list of sole Dependencies 
is what you say?
   
   When you collect+resolve, you are interested in all, so even root (again, 
this is for "ad-hoc" operations, like javadoc may tell: "resolve me this taglet 
and its dependencies", in that case, javadoc plugin KNOWS root is taglet, but 
will still need to handle the rest of transitive hull, and place them or use 
that as needed).
   
   ---
   
   @gnodet if I understand you correctly, sans "root", you consider _everything 
else_ (the transitive hull) as "dependency"? Which kinda makes sense, as they 
DID enter the result collection as "dependencies of root"?



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to