You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2018/12/06 12:31:37 UTC

[GitHub] mickaelistria commented on a change in pull request #194: MNG-6530 - Test + System property to disable global model cache

mickaelistria commented on a change in pull request #194: MNG-6530 - Test + System property to disable global model cache
URL: https://github.com/apache/maven/pull/194#discussion_r239435286
 
 

 ##########
 File path: maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
 ##########
 @@ -355,7 +365,8 @@ private ModelSource createStubModelSource( Artifact artifact )
 
         ReactorModelPool modelPool = new ReactorModelPool();
 
-        InternalConfig config = new InternalConfig( request, modelPool );
+        InternalConfig config = new InternalConfig( request, modelPool,
+                useGlobalModelCache() ? getModelCache() : new ReactorModelCache() );
 
 Review comment:
   I think the change is right. See https://github.com/apache/maven/commit/8bc3c207d0aa7cef72171af23d9c4667b2d46c5d (which is the behavior I'd like to avoid when property is set). On lines 294 & 358, it was first `null` then `modelCache`; so I'm really restoring these values when cache is disabled.
   I'm not sure it's what's best, but at this point, I'd rather keep focus on fixing the issue rather than investigating more possible improvements.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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