gnodet commented on code in PR #13036:
URL: https://github.com/apache/maven/pull/13036#discussion_r4024263121


##########
api/maven-api-core/src/main/java/org/apache/maven/api/Node.java:
##########
@@ -40,37 +40,98 @@
 @Provider
 public interface Node {
 
+    /**
+     * Returns the artifact for this node.
+     *
+     * @return artifact for this node, or {@code null} if none
+     */
+    @Nullable
+    Artifact artifact();
+
+    /**
+     * Returns the dependency for this node.
+     *
+     * @return dependency for this node, or {@code null} if none
+     */
+    @Nullable
+    Dependency dependency();
+
+    /**
+     * Gets the child nodes of this node.
+     *
+     * @return the child nodes of this node, never {@code null}
+     */
+    @Nonnull
+    List<Node> children();
+
+    /**
+     * Returns the remote repositories of this node.
+     *
+     * @return repositories of this node, never {@code null}
+     */
+    @Nonnull
+    List<RemoteRepository> remoteRepositories();
+
+    /**
+     * The repository where this artifact has been downloaded from.
+     *
+     * @return the repository, never {@code null}
+     */
+    @Nonnull
+    Optional<RemoteRepository> repository();

Review Comment:
   Addressed in a separate PR #13153, which implements `Node.getRepository()` 
via `LocalRepositoryManager.find()` (no network I/O) and fixes the Javadoc. The 
implementation in this PR keeps the existing `UnsupportedOperationException` to 
keep the concerns separate.



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

Reply via email to