[ https://jira.codehaus.org/browse/MNG-5669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tibor Digana updated MNG-5669: ------------------------------ Fix Version/s: Issues to be reviewed for 3.x > same pom.xml is read multiple times > ----------------------------------- > > Key: MNG-5669 > URL: https://jira.codehaus.org/browse/MNG-5669 > Project: Maven > Issue Type: Bug > Affects Versions: 3.2.3 > Reporter: Igor Fedorenko > Fix For: Issues to be reviewed for 3.x > > > The same parent pom.xml is read multiple times during single > ProjectBuilder#build invocation. This is a performance regression introduced > in 3.2.3-SNAPSHOT. I do not know how much this affects real-world build > performance. > ~~~~~ > ProjectBuilder#build(File,ModelSource,...) first constructs project model then > initializes MavenProject instance. > When project model is constructed, all local and remote parent pom.xml files > are read and stored in model cache during ModelBuilder#readParent. The cache > uses GAV keys. Only parent models are stored in the cache. The model of the > project being being is not cached. > When MavenProject instance is initialized, ProjectBuilder#build is called > recursively to create parent MavenProject instances. > There are appears to be two problems > * ModelCache used to create original project Model is not passed to the > recursive ProjectBuilder#build invocation. > * ProjectBuilder#build does not use ModelCache for the project being built. > During recursive invocation, this means the cache is never used to load > parent pom.xml models cached during outer ProjectBuilder#build invocation. > The solution is to introduce additional short-lived model cached keyed by > pom.xml file location (project GAV is not known when ProjectBuilder#build is > called). Alternatively, introduce ProjectBuilder#buildParent that will use > the model cache. -- This message was sent by Atlassian JIRA (v6.1.6#6162)