Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4918

MavenProject#clone() doubles active profiles

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0, 3.0.1
    • 3.0.2
    • None
    • None
    • all

    Description

      The error occured in our Project with more than 60 submodules and aggregating JavaDoc. Due to the forking of the LifeCycle many clones of the MavenProject object seem to be performed. Since MavenProject#clone doubles the entries in the list of active profiles we start with one active profile and after a few dozen clones the list of active profiles exceeds 10.000.000 elements. This will than kill the VM by OOME.

      mavenProject.getActiveProfiles().size() == 1
      mavenProject.clone().getActiveProfiles().size() == 2
      mavenProject.clone().clone().getActiveProfiles().size() == 4
      and so on

      Attachments

        1. test.patch
          3 kB
          Sebastian Annies
        2. fix.patch
          0.6 kB
          Sebastian Annies

        Activity

          People

            bentmann Benjamin Bentmann
            sannies Sebastian Annies
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: