【问题标题】:Hudson -> java.lang.OutOfMemoryError: Java heap space on maven clean test package -P deploy in HudsonHudson -> java.lang.OutOfMemoryError: Java heap space on maven clean test package -P deploy in Hudson
【发布时间】:2011-03-02 01:47:49
【问题描述】:

我在 Hudson 有一个使用以下构建选项构建的 maven 项目:

构建经常失败并出现 OutOfMemoryError: Java heap space 但我不知道为什么。

失败看起来像这样:

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38 seconds
[INFO] Finished at: Mon Feb 28 17:04:28 EST 2011
[INFO] Final Memory: 48M/95M
[INFO] ------------------------------------------------------------------------
channel stopped
Deploying artifacts to http://test/archiva/repository/snapshots
Deploying the main artifact pom.xml
[INFO ] Retrieving previous build number from test-archiva-default
[INFO ] Uploading project information for home-buildings 2.0-SNAPSHOT
[INFO ] Retrieving previous metadata from test-archiva-default
[INFO ] Uploading repository metadata for: 'snapshot com.test.home:core:2.0-SNAPSHOT'
[INFO ] Retrieving previous metadata from test-archiva-default
[INFO ] Uploading repository metadata for: 'artifact com.test.home:core'
Deploying the main artifact core.ear
[INFO ] Retrieving previous build number from test-archiva-default
[INFO ] Retrieving previous metadata from test-archiva-default
[INFO ] Uploading repository metadata for: 'snapshot com.test.home:core-ear:2.0-SNAPSHOT'
[INFO ] Retrieving previous metadata from test-archiva-default
[INFO ] Uploading repository metadata for: 'artifact com.test.home:core-ear'
[INFO ] Uploading project information for core-ear 2.0-SNAPSHOT
Deploying the main artifact core.war
[INFO ] Retrieving previous build number from test-archiva-default
FATAL: Java heap space
java.lang.OutOfMemoryError: Java heap space

有人知道如何阻止这种情况发生吗?

【问题讨论】:

    标签: maven hudson out-of-memory


    【解决方案1】:

    我想知道这个 MAVEN_OPTS 是否有效。也许这个链接会有所帮助,它直接修改了 Maven 启动脚本。

    http://vikashazrati.wordpress.com/2007/07/26/quicktip-how-to-increase-the-java-heap-memory-for-maven-2-on-linux/

    当我在 Hudson 遇到自动构建问题时,我会首先尝试模拟构建环境并手动启动构建任务,以检查问题是否可以重现。通过这种方式,我可以将问题追溯到 Hudson 或 Maven。

    毕竟,Hudson 就像一个自动化批处理系统。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-08-03
      • 2016-04-15
      • 1970-01-01
      • 1970-01-01
      • 2013-05-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多