maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [maven] michael-o commented on a change in pull request #286: [MNG-6656] Introduce base for build/consumer process
Date Mon, 02 Mar 2020 13:58:30 GMT
michael-o 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_r386391750
 
 

 ##########
 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:
   Stupid question: Does this pool need to be synchronized?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message