[GitHub] [maven] elharo commented on a diff in pull request #1198: Javadoc fixes

2023-07-05 Thread via GitHub


elharo commented on code in PR #1198:
URL: https://github.com/apache/maven/pull/1198#discussion_r1253549700


##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -43,27 +48,43 @@ public interface Type {
 String TEST_JAR = "test-jar";
 
 /**
- * Returns the dependency type name.
+ * Returns the dependency type id.
+ * The id uniquely identifies this dependency type.
  *
- * @return the type name
+ * @return the id of this type
  */
-String getName();
+String getId();
 
 /**
- * Get the file extension associated to the file represented by the 
dependency type.
+ * Get the file extension of artifacts of this type.
  *
  * @return the file extension
  */
 String getExtension();
 
 /**
- * Get the classifier associated to the dependency type.
+ * Get the default classifier associated to the dependency type.
+ * The default classifier can be overriden when specifying

Review Comment:
   overridden



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -20,14 +20,19 @@
 
 import org.apache.maven.api.annotations.Experimental;
 import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.model.Dependency;
 
 /**
- * An artifact's{@code Type} represents a known kind of artifacts.
- * Such types are often associated to an extension and possibly
- * a classifier, for example {@code java-source} has a {@code jar}
- * extension and a {@code sources} classifier.
- * It is also used to determine if a given dependency should be
- * included in the classpath or if its transitive dependencies should.
+ * A dependency's {@code Type} is uniquely identified by a {@code String},
+ * and semantically represents a known kind of dependency.
+ * 
+ * It provides information about the file type (or extension) of the 
associated artifact,
+ * its default classifier, and how the artifact will be used in the build when 
creating
+ * classpaths.
+ * 
+ * For example, the type {@code java-source} has a {@code jar} extension and a

Review Comment:
   classifier, the artifact
   -->
   classifier. The artifact



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -43,27 +48,43 @@ public interface Type {
 String TEST_JAR = "test-jar";
 
 /**
- * Returns the dependency type name.
+ * Returns the dependency type id.
+ * The id uniquely identifies this dependency type.
  *
- * @return the type name
+ * @return the id of this type
  */
-String getName();
+String getId();
 
 /**
- * Get the file extension associated to the file represented by the 
dependency type.
+ * Get the file extension of artifacts of this type.
  *
  * @return the file extension
  */
 String getExtension();
 
 /**
- * Get the classifier associated to the dependency type.
+ * Get the default classifier associated to the dependency type.
+ * The default classifier can be overriden when specifying
+ * the {@link Dependency#getClassifier()}.
  *
- * @return the classifier
+ * @return the default classifier
  */
 String getClassifier();
 
-boolean isIncludesDependencies();
-
+/**
+ * Specifies if the artifact contains java code and should be

Review Comment:
   Java byte code?



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -43,27 +48,43 @@ public interface Type {
 String TEST_JAR = "test-jar";
 
 /**
- * Returns the dependency type name.
+ * Returns the dependency type id.
+ * The id uniquely identifies this dependency type.
  *
- * @return the type name
+ * @return the id of this type
  */
-String getName();
+String getId();
 
 /**
- * Get the file extension associated to the file represented by the 
dependency type.
+ * Get the file extension of artifacts of this type.
  *
  * @return the file extension
  */
 String getExtension();
 
 /**
- * Get the classifier associated to the dependency type.
+ * Get the default classifier associated to the dependency type.
+ * The default classifier can be overriden when specifying
+ * the {@link Dependency#getClassifier()}.
  *
- * @return the classifier
+ * @return the default classifier
  */
 String getClassifier();
 
-boolean isIncludesDependencies();
-
+/**
+ * Specifies if the artifact contains java code and should be
+ * added to the classpath.
+ *
+ * @return if the artifact should be added to the classpath
+ */
 boolean isAddedToClasspath();
+
+/**
+ * Specifies if the artifacts already embeds its own dependencies.

Review Comment:
   artifacts --> artifact



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -43,27 +48,43 @@ public interface Type {
 S

[GitHub] [maven] elharo commented on a diff in pull request #1198: Javadoc fixes

2023-07-05 Thread via GitHub


elharo commented on code in PR #1198:
URL: https://github.com/apache/maven/pull/1198#discussion_r1252960901


##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -22,7 +22,7 @@
 import org.apache.maven.api.annotations.Immutable;
 
 /**
- * An artifact's{@code Type} represents a known kind of artifacts.
+ * A dependency's {@code Type} represents a known kind of dependencies.
  * Such types are often associated to an extension and possibly

Review Comment:
   associated with
   
   Is this often or always?



##
api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java:
##
@@ -23,9 +23,9 @@
 public interface Dependency extends Artifact {

Review Comment:
   Realizing now this inheritance hierarchy is wonky. This suggests a 
Dependency *is* an artifact, which isn't true. Nothing to do about that in this 
PR of course, but I wanted to call it out while I'm thinking about it. 



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -22,7 +22,7 @@
 import org.apache.maven.api.annotations.Immutable;
 
 /**
- * An artifact's{@code Type} represents a known kind of artifacts.
+ * A dependency's {@code Type} represents a known kind of dependencies.

Review Comment:
   dependency (singular)
   
   This comment gives an example, which is good, but it still doesn't fully 
explain what a dependency type *is*. see 
https://issues.apache.org/jira/browse/MNGSITE-521
   



-- 
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