You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jochen Kuhnle (JIRA)" <ji...@codehaus.org> on 2007/02/07 08:36:44 UTC

[jira] Created: (MNG-2813) OutOfMemoryError when using profiles and pom inheritance

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
         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

        

[jira] Updated: (MNG-2813) OutOfMemoryError when using profiles and pom inheritance

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-2813:
-------------------------------

    Assignee:     (was: Jason van Zyl)

Applying and trying on the trunk.

> 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

        

[jira] Closed: (MNG-2813) OutOfMemoryError when using profiles and pom inheritance

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ 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

        

[jira] Updated: (MNG-2813) OutOfMemoryError when using profiles and pom inheritance

Posted by "Jochen Kuhnle (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Kuhnle updated MNG-2813:
-------------------------------

    Attachment: MNG-2813-maven-project.patch

> 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
>         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

        

[jira] Updated: (MNG-2813) OutOfMemoryError when using profiles and pom inheritance

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-2813:
-------------------------------

    Fix Version/s: 2.1-alpha-1

> 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
>         Assigned To: Jason van Zyl
>            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