[ https://issues.apache.org/jira/browse/MNG-6530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16711132#comment-16711132 ]
Mickael Istria commented on MNG-6530: ------------------------------------- I've given another round of thought about it, and I believe that in the general case, a system property is better. Indeed, with m2e (and others) we can have the ProjectBuilder used by some mojos invoked in the same JVM (so using this cache) and relying on ProjectBuilder.build(...) to get some MavenProject. Those mojos would return erroneous results if some parent pom change because those change would be ignored. I think in the context of m2e or any application where lifetime of ProjectBuilder can see pom changing, we really need a way to fully disable the cache in any case, and not only for a given ProjectBuildRequest (as Maven plugin providers shouldn't care about whether they're in mvn CLI or in m2e or whatever to decide whether to change their ProjectBuilderRequest or not). So the system property seems to be a better solution than an explicit API to invoke for each consumer, basically because consumers cannot know whether to change the default behavior or not, it's up to the Plexus container "owner" (mvn CLI or m2e or ...) to decide that. > 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)