Ant脚本被杀死但不是-verbose

时间:2023-01-24 17:07:00

I am running an ant script using ant -f build.xml. This script is supposed to compile my project and generate a jar file but some seconds after ant starts to generate the jar file, the project gets killed and all I see is the message "Killed" in the console.

我正在使用ant -f build.xml运行ant脚本。这个脚本应该编译我的项目并生成一个jar文件,但是在ant开始生成jar文件后几秒钟,项目被杀死,我看到的只是控制台中的“Killed”消息。

If I run the same command but with the "-verbose" option, the build finishes successfully.

如果我使用“-verbose”选项运行相同的命令,则构建成功完成。

Any ideas?

Thanks.

Update: This is the ant output i get:

更新:这是我得到的蚂蚁输出:

Buildfile: build.xml

compile:

jar:
  [jar] Building jar: /var/lib/hudson/jobs/asproj/workspace/build/asproj.jar
Killed

This is the dmesg output I get after the process is killed:

这是进程被杀死后得到的dmesg输出:

Out of memory: kill process 16398 (bash) score 13929 or a child
Killed process 1499 (java)

So it's probably memory related, but it's not the ant jvm.. it has something to do with the bash process.

所以它可能与内存有关,但它不是蚂蚁jvm ..它与bash进程有关。

1 个解决方案

#1


0  

You can try increasing JVM size using ANT_OPTS -

您可以尝试使用ANT_OPTS增加JVM大小 -

set ANT_OPTS=-Xms500m

This sets JVM size to 500 MB.

这将JVM大小设置为500 MB。

#1


0  

You can try increasing JVM size using ANT_OPTS -

您可以尝试使用ANT_OPTS增加JVM大小 -

set ANT_OPTS=-Xms500m

This sets JVM size to 500 MB.

这将JVM大小设置为500 MB。