buildr antwrap OutOfMemoryError PermGen 空间

发布于 2024-12-17 06:40:07 字数 540 浏览 3 评论 0原文

# 我使用 Buildr 作为我的构建工具。我的构建过程的一部分是使用 JAX-WS 从 WSDL 生成 Java 源代码。我有一个 ANT 构建脚本,可以通过 wsimport ant 任务执行此操作。使用 Buildr 中的 AntWrap Ruby 模块我可以做同样的事情。

我的问题是在尝试为许多 WSDL 生成源代码时遇到 OutOfMemoryError PermGen space。我在单独运行 Ant 时遇到了同样的问题,但通过将 ANT_OPTS 环境变量设置为解决了该问题:

set ANT_OPTS=-Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m

但是当我使用 Buildr 运行构建时,即使设置了此环境变量,我仍然收到错误。我什至尝试在我的构建文件中设置此变量,但这没有帮助。

我的环境如下:

  • windows XP
  • JRuby 1.6.3
  • Buildr 1.4.6
  • AntWrap 0.7.0

#
I am using Buildr as my build tool. Part of my build process generates Java source from a WSDL using JAX-WS. I have an ANT build script that does this with the wsimport ant task. Using the AntWrap Ruby module in Buildr I can do the same thing.

My problem is I am getting the OutOfMemoryError PermGen space when trying to generate source for many WSDL's. I got the same problem when running Ant by itself but resolved it by setting the ANT_OPTS environment variable to:

set ANT_OPTS=-Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m

But when I run my build using Buildr I still get the error even though this environment variable is set. I have even tried setting this variable in my build file but this hasn't helped.

My environment is as follows:

  • windows XP
  • JRuby 1.6.3
  • Buildr 1.4.6
  • AntWrap 0.7.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑,眼淚并存 2024-12-24 06:40:07

您是否尝试在构建文件中设置 JAVA_OPTS ,我不确定 buildr/antwrap 是否选择了 ANT_OPS 环境变量。

ENV['JAVA_OPTS'] ||= '-Xms1g -Xmx1g'

Did you try setting JAVA_OPTS in the buildfile, I am not sure if buildr/antwrap picks up the ANT_OPS environment variables.

ENV['JAVA_OPTS'] ||= '-Xms1g -Xmx1g'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文