java - Jenkins 中的 Java Ant 任务构建失败

标签 java ant jenkins

我正在 Amazon t2.micro Ubuntu 实例的 Jenkins 中运行 ant。 Java 任务失败。下面是我的 Jenkins 控制台

 [java] Compiling module com.eit.manufacturing.displayprocessor.Manufacturing
 [java] Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000ed84e000, 53288960, 0) failed; error='Cannot allocate memory' (errno=12)
 [java] #
 [java] # There is insufficient memory for the Java Runtime Environment to continue.
 [java] # Native memory allocation (malloc) failed to allocate 53288960 bytes for committing reserved memory.
 [java] # An error report file with more information is saved as:
 [java] # /root/.jenkins/jobs/Manufacturing Apps/workspace/ManufacturingWeb/hs_err_pid5235.log

这是我的 Ant 脚本:

<target
    name="clientcompile"
    depends="servercompile"
    description="GWT compile to JavaScript (production mode)" >

    <java
        classname="com.google.gwt.dev.Compiler"
        failonerror="true"
        fork="true" >
        <classpath>
        <pathelement location="src" />
        <path refid="project.class.path" />
        <pathelement location="${gwt.sdk}\validation-api-1.0.0.GA.jar" />
        <pathelement location="${gwt.sdk}\validation-api-1.0.0.GA-sources.jar" />
        </classpath>
        <jvmarg value="-Xmx256M" />
        <arg line="-war" />
        <arg value="war" />
        <arg line="${gwt.args}" />
        <arg value="com.eit.manufacturing.displayprocessor.Manufacturing" />
   </java>
</target>

如何解决这个问题?

最佳答案

java 尝试以下操作任务

<jvmarg value="-Xmx1g" />

关于java - Jenkins 中的 Java Ant 任务构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30935800/

相关文章:

java - 如何通过show java app使apk难以反编译?

java - 线程完成工作后停止 "his brothers"

android - Cordova Android 项目无法编译

ant - Findbug - ANT xslt 样式表源代码引用

jenkins - 将 opencover xml 输出转换为 ncover xml

java - Jenkins 显示 log4j 提示 : log4j:WARN No appenders could be found for logger

java - 我正在尝试将个位数整数合并为单个数字

JavaFX 忽略自定义字体的粗细和样式

java - Ant/Ubuntu/Eclipse JAVA_HOME

jenkins - 推送到 GitLab 存储库不会触发 Jenkins 构建