You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2023/02/21 10:16:00 UTC
[jira] [Closed] (MNG-7704) New field in DefaultProjectBuilder breaks maven-polyglot extension
[ https://issues.apache.org/jira/browse/MNG-7704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamas Cservenak closed MNG-7704.
--------------------------------
Resolution: Duplicate
> New field in DefaultProjectBuilder breaks maven-polyglot extension
> ------------------------------------------------------------------
>
> Key: MNG-7704
> URL: https://issues.apache.org/jira/browse/MNG-7704
> Project: Maven
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.9.0
> Reporter: Christoph Läubrich
> Priority: Major
>
> There was a new method introduced:
> org.apache.maven.project.DefaultProjectBuilder.getModelCache()
> this breaks the https://github.com/takari/polyglot-maven extension that fails with a NPE if running on maven 3.9.0
> Also this probably should be fixed there, this can be mitigated in maven by doing the following:
> {code:java}
> private ModelCache createModelCache(RepositorySystemSession session) {
> if (modelCacheFactory == null) {
>
> return null; // or do whatever DefaultModelCache does here
> }
> return modelCacheFactory.createCache(session);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)