[ http://jira.codehaus.org/browse/MNG-2813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason van Zyl closed MNG-2813. ------------------------------ Resolution: Fixed Patch applied to trunk and branch. > OutOfMemoryError when using profiles and pom inheritance > -------------------------------------------------------- > > Key: MNG-2813 > URL: http://jira.codehaus.org/browse/MNG-2813 > Project: Maven 2 > Issue Type: Bug > Components: Profiles > Affects Versions: 2.0.4 > Environment: maven-2.0.4 > Reporter: Jochen Kuhnle > Priority: Critical > Fix For: 2.1-alpha-1 > > Attachments: MNG-2813-maven-project.patch > > > When using profiles and POM inheritance, Maven grows out of heap space. This > especially happens when using Xpp3Dom's combine.children="append" on plugin > configurations in the POMs. > The cause of this is the DefaultProfileInjector in maven-project. It calls > Xpp3Dom.mergeXpp3Dom with the profile's configuration as dominant DOM, and > the models configuration as recessive DOM to merge the dominant DOM into the > recessive one. However, mergeXpp3Dom directly changes the dominant DOM, > instead of creating a merged copy. Therefor the profiles DOM is changed. If > this profile is injected a second time, e.g. because of a reactor build, the > original DOM is gone. Since the changed profile is also saved in the model, > this often results in the profile DOM (changed by earlier merge) being merged > into itself (saved in model from earlier merge). Boom -- we get an > OutOfMemoryError. > The attached patch changes DefaultProfileInjector by ensuring that dominant > DOMs are copied before they are passed to Xpp3Dom.mergeXpp3Dom. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira