在构建期间在Maven中进行OOM

时间:2018-06-27 00:17:45

标签: java maven

我需要一些行家帮助。我有一个项目,其中包含一组复杂的依赖项。最近,当我尝试构建它时,我得到以下信息:

[INFO] Total time: 39:41 min
[INFO] Finished at: 2018-06-26T16:14:11-04:00
[INFO] Final Memory: 100M/30643M
[INFO] ------------------------------------------------------------------------
[ERROR] Java heap space -> [Help 1]
java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:3181)
    at java.util.ArrayList.grow(ArrayList.java:261)
    at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:235)
    at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:227)
    at java.util.ArrayList.add(ArrayList.java:458)
    at org.eclipse.aether.util.graph.visitor.PathRecordingDependencyVisitor.visitEnter(PathRecordingDependencyVisitor.java:99)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:324)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:329)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:329)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:329)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:329)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:329)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:329)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:329)
    at org.eclipse.aether.graph.DefaultDependencyNode.accept(DefaultDependencyNode.java:329)
    at org.eclipse.aether.util.graph.transformer.NearestVersionSelector.newFailure(NearestVersionSelector.java:149)
    at org.eclipse.aether.util.graph.transformer.NearestVersionSelector.backtrack(NearestVersionSelector.java:111)
    at org.eclipse.aether.util.graph.transformer.NearestVersionSelector.selectVersion(NearestVersionSelector.java:84)
    at org.eclipse.aether.util.graph.transformer.ConflictResolver.transformGraph(ConflictResolver.java:187)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:275)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:317)
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
    at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

给出堆栈跟踪,看起来我有一个循环依赖,但是我找不到它。当我尝试运行mvn dependency:tree时,出现相同的错误。

我还尝试将内存增加到8192M,但这只是给了我一个GC overhead limit exceeded错误。

有什么见解或想法吗?

0 个答案:

没有答案