[ 
https://issues.apache.org/jira/browse/MNG-7344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17832557#comment-17832557
 ] 

ASF GitHub Bot commented on MNG-7344:
-------------------------------------

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;
     } // 

> Effective pom should contain more finegrained details regarding its content 
> origin: track dependencyManagement import
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-7344
>                 URL: https://issues.apache.org/jira/browse/MNG-7344
>             Project: Maven
>          Issue Type: Improvement
>          Components: Inheritance and Interpolation, POM
>            Reporter: Robert Scholte
>            Priority: Major
>             Fix For: 3.9.x-candidate, 4.0.x-candidate
>
>         Attachments: MicrosoftTeams-image.png
>
>
> To support MPH-183 some changes needs to be done in Maven Core.
> For every element that is not part of the raw model, it must be possible to 
> get the "resolution path" to that element. 
> Until now, only the usual pure inheritance is tracked
> The following are known to add elements to the effective pom:
> - BOMs dependencyManagement import
> - [Tiles Maven Plugin|https://github.com/repaint-io/maven-tiles] by [~talios]
> Without this feature, it is very hard to detect where these extra elements 
> are coming from.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to