You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "hboutemy (via GitHub)" <gi...@apache.org> on 2024/03/31 07:41:01 UTC

Re: [PR] [MNG-7344] track dependencyManagement import location in effective Model for MPH-183 [maven]

hboutemy commented on code in PR #603:
URL: https://github.com/apache/maven/pull/603#discussion_r1545568921


##########
api/maven-api-model/src/main/java/org/apache/maven/api/model/InputLocation.java:
##########
@@ -83,6 +95,13 @@ public Map<Object, InputLocation> getLocations() {
         return locations;
     }
 
+    /**
+     * Gets the input location that caused this model to be read.
+     */

Review Comment:
   we need an `@since` here to remember



##########
api/maven-api-model/src/main/java/org/apache/maven/api/model/InputSource.java:
##########
@@ -64,6 +74,14 @@ public String getModelId() {
         return this.modelId;
     }
 
+    public InputLocation getImportedFrom() {
+        return importedFrom;
+    }
+
+    public InputSource importedFrom(InputLocation importedFrom) {
+        return new InputSource(modelId, location, importedFrom);

Review Comment:
   really create a new object and forget about it? strange (i did not really dig in depth, just giving initial feedback)



##########
maven-model/src/main/java/org/apache/maven/model/InputLocation.java:
##########
@@ -217,6 +223,24 @@ public InputSource getSource() {
         return this.source;
     } // -- InputSource getSource()
 
+    /**
+     * Get the imported from location.
+     *
+     * @return InputLocation

Review Comment:
   same `@since`



##########
api/maven-api-model/src/main/java/org/apache/maven/api/model/InputLocationTracker.java:
##########
@@ -20,4 +20,6 @@
 
 public interface InputLocationTracker {
     InputLocation getLocation(Object field);
+
+    InputLocation getImportedFrom();

Review Comment:
   same `@since`



##########
api/maven-api-model/src/main/java/org/apache/maven/api/model/InputSource.java:
##########
@@ -64,6 +74,14 @@ public String getModelId() {
         return this.modelId;
     }
 
+    public InputLocation getImportedFrom() {

Review Comment:
   same `@since`



-- 
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-unsubscribe@maven.apache.org

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