rfscholte commented on a change in pull request #391:
URL: https://github.com/apache/maven/pull/391#discussion_r542001814



##########
File path: 
maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
##########
@@ -703,15 +671,14 @@ private boolean build( List<ProjectBuildingResult> 
results, List<MavenProject> p
     }
 
     @SuppressWarnings( "checkstyle:methodlength" )
-    private void initProject( MavenProject project, Map<String, MavenProject> 
projects,
+    private void initProject( MavenProject project, Map<File, MavenProject> 
projects,
                               boolean buildParentIfNotExisting, 
ModelBuildingResult result,
                               Map<File, Boolean> profilesXmls, 
ProjectBuildingRequest projectBuildingRequest )
     {
         Model model = result.getEffectiveModel();
 
         project.setModel( model );
-        project.setOriginalModel( result.getRawModel() );
-        project.setFile( model.getPomFile() );

Review comment:
       File was already set on the project when creating it (line 167)
   Also, the Model was being abused to hold the file. A model is created with 
an InputStream, so the file information was added via post-processing. Only the 
MavenProject is interested in the file, not the Model.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to