Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.5
-
None
-
Windows XP SP2 with all available patches
Sun JDK 1.6.0
Description
Accidentially I forgot to remove an empty <module></module> entry in my pom.xml. When I tried to fully clean my project and all its subprojects Maven crashes with an OutOfMemoryError after a couple of minutes:
H2841@YBPB055257 /cygdrive/d/workspaces/sukv-maven
$ mvn -e -X clean
+ Error stacktraces are turned on.
Maven version: 2.0.5
[DEBUG] Building Maven user-level plugin registry from: 'D:\Dokumente und Einstellungen\H2841\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'c:\maven-2.0.5\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Java heap space
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
java.lang.OutOfMemoryError: Java heap space
at org.codehaus.plexus.util.xml.pull.MXParser.ensurePC(MXParser.java:3047)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1374)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1090)
at org.codehaus.plexus.util.xml.pull.MXParser.nextText(MXParser.java:1055)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseScm(MavenXpp3Reader.java:4045)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Reader.java:2206)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4422)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1345)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1309)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:429)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:195)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:523)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:455)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:499)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 minutes 26 seconds
[INFO] Finished at: Wed Mar 07 12:40:03 CET 2007
[INFO] Final Memory: 31M/234M
[INFO] ------------------------------------------------------------------------
H2841@YBPB055257 /cygdrive/d/workspaces/sukv-maven
$
pom.xml to test:
<modules>
<module>module1</module>
...
<module>moduleN</module>
<module></module>
</modules>
Maven doesn't complain about the empty <module></module> entry, and obviously runs in a recursion in this case.