diff --git a/maven-plugin/src/main/java/hudson/maven/MavenModule.java b/maven-plugin/src/main/java/hudson/maven/MavenModule.java index a129874ac1..64ec69329a 100644 --- a/maven-plugin/src/main/java/hudson/maven/MavenModule.java +++ b/maven-plugin/src/main/java/hudson/maven/MavenModule.java @@ -403,12 +403,15 @@ public final class MavenModule extends AbstractMavenProject myParentsModules = data.modulesPerParent.get(getParent()); - if (myParentsModules == null) { - myParentsModules =new HashMap(); + // Can lead to OOME, if remembered in the computational data and there are lot big multi-module projects + // TODO: try to use soft references to clean the heap when needed + Map myParentsModules; // = data.modulesPerParent.get(getParent()); + + //if (myParentsModules == null) { + myParentsModules = new HashMap(); for (MavenModule m : getParent().getModules()) { if(m.isDisabled()) continue; @@ -417,8 +420,8 @@ public final class MavenModule extends AbstractMavenProject allModules; - Map> modulesPerParent = new HashMap>(); + //Map> modulesPerParent = new HashMap>(); public MavenDependencyComputationData( Map modules) {