rfscholte commented on a change in pull request #286: [MNG-6656] Introduce base 
for build/consumer process
URL: https://github.com/apache/maven/pull/286#discussion_r386614058
 
 

 ##########
 File path: 
maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
 ##########
 @@ -266,16 +302,49 @@ private DependencyResolutionResult resolveDependencies( 
MavenProject project, Re
         return ids;
     }
 
-    private ModelBuildingRequest getModelBuildingRequest( InternalConfig 
config )
+    private ModelBuildingRequest getModelBuildingRequest( InternalConfig 
config, File pomFile )
     {
         ProjectBuildingRequest configuration = config.request;
 
         ModelBuildingRequest request = new DefaultModelBuildingRequest();
 
         RequestTrace trace = RequestTrace.newChild( null, configuration 
).newChild( request );
 
+        RepositorySystemSession repoSession;
+        if ( Features.buildConsumer().isActive() )
+        {
+            TransformerContext context = new TransformerContext()
+            {
+                @Override
+                public String getUserProperty( String key )
+                {
+                    return config.session.getUserProperties().get( key );
+                }
+
+                @Override
+                public Model getRawModel( Path p )
+                {
+                    return config.modelPool.get( p );
+                }
+
+                @Override
+                public Model getRawModel( String groupId, String artifactId )
+                {
+                    return config.modelPool.get( groupId, artifactId, null );
 
 Review comment:
   It has never been, see 
https://maven.apache.org/ref/3.6.3/maven-core/xref/org/apache/maven/project/ReactorModelPool.html
   We should be safe because making the buildplan is done in a single thread. 
Once the buildplan is ready, the builder kicks in and can execute with multiple 
threads.

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


With regards,
Apache Git Services

Reply via email to