为从 Gradle 运行的 Cobertura ant 任务增加 permgen 空间 [英] Increasing permgen space for Cobertura ant task running from Gradle

查看:25
本文介绍了为从 Gradle 运行的 Cobertura ant 任务增加 permgen 空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 Cobertura 作为我的 Gradle 构建的一部分运行.

I'm getting the following trying to run Cobertura as part of my Gradle build.

:cobertura
Instrumenting classes for Cobertura
Exception in thread "Test worker" java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space

我尝试在我的 gradle 包装脚本中提高 DEFAULT_JVM_OPTS/-XX:MaxPermSize ,但没有效果.有没有更直接(和有效)的方法来做到这一点?

I've tried bumping up DEFAULT_JVM_OPTS/-XX:MaxPermSize in my gradle wrapper script, to no effect. Is there a more direct (and effective) way to do this?

推荐答案

唯一对我有用的是将我的 Linux 机器上的 .bashrc 更改为 export _JAVA_OPTIONS='-XX:MaxPermSize=512m'证明这在我构建时被 gradle 检测到的证据显示为以下消息:拿起_JAVA_OPTIONS: -XX:MaxPermSize=512m

The only thing that worked for me was changing the .bashrc on my Linux box to have export _JAVA_OPTIONS='-XX:MaxPermSize=512m' Proof that this got detected by gradle when I built was shown with this message: Picked up _JAVA_OPTIONS: -XX:MaxPermSize=512m

这篇关于为从 Gradle 运行的 Cobertura ant 任务增加 permgen 空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆