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

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

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


> Regression in ProjectBuilder when file change between invocations (introduced 
> by MNG-6311)
> ------------------------------------------------------------------------------------------
>
>                 Key: MNG-6530
>                 URL: https://issues.apache.org/jira/browse/MNG-6530
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.0
>            Reporter: Mickael Istria
>            Priority: Critical
>             Fix For: 3.6.1
>
>
> The patch for MNG-6311 introduces a regression in ProjectBuilder due to 
> missing cache invalidation when content change.
> It was identified as a potential issue by [~fbricon] on Oct 10, yet no 
> further investigation happened and Maven 3.6.0 was released with this 
> regression.
> This regression prevents Eclipse m2e (and probably most APIs using the 
> ProjectBuilder for a longer session which allows pom.xml files to be 
> modified) from adopting 3.6.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to