Maven heap space

后端 未结 2 820
我在风中等你
我在风中等你 2021-01-02 17:42

When I am running mvn clean install for my build on linux RHEL 6. I\'m getting the following error: java.lang.outOfMemoryError heap space.

2条回答
  •  旧时难觅i
    2021-01-02 18:02

    You can run the mvn command, so its irrelevant wether you are using a .sh or .bat file. For future reference you should keep in mind though that .bat files are for Windows, not Linux. Anyway, in the same shell you are running your mvn command in, do this first:

    export MAVEN_OPTS="-Xmx512M"
    

    Then execute your mvn command. Bump the number up if you still run out of memory.

提交回复
热议问题