06-25-2020 11:28 AM
Hello, as the title says, I'm having trouble assembling war. All I'm doing is cloning acs-community-packaging from Github, cd into the root folder, and running mvn clean install. I have not modified any pom.xml. The error I'm getting is
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.2.3:war (default-war) on project content-services-community: Error assembling WAR: Problem creating war: Execution exception: Java heap space -> [Help 1}
Thank you.
os ubuntu 16.04
mvn 3.6.3
jdk11
06-25-2020 01:34 PM
You need to set MAVEN_OPTS as suggested by @EddieMay
Navigate to maven installattion's bin directory (<mavenInstallDirectory>/bin) and open your mvn file and add the following line:
export MAVEN_OPTS=-Xmx1024m
This will allow to specify java heap space based on your project needs. You can increase it depending on your case.
After making changes, close all terminals and start a new terminal to execute "mvn clean install"
Detailed documentation can be found here:
https://docs.alfresco.com/5.2/tasks/alfresco-sdk-install-maven-opts.html
You can look at this tutorial to know more on heap and stuff: https://javarevisited.blogspot.com/2011/05/java-heap-space-memory-size-jvm.html
06-25-2020 11:55 AM
Hi @cranejimmy3,
Could it be as issue of not enough heap memory? Have you set MAVEN_OPTS correctly?
HTH,
06-25-2020 12:11 PM
Thanks for the reply.
Regarding Maven, the only thing I did with maven was adding the path to ~/.bashrc.
export M2_HOME=/home/user/Downloads/maven export PATH=${M2_HOME}/bin:bin${PATH}
06-25-2020 01:34 PM
You need to set MAVEN_OPTS as suggested by @EddieMay
Navigate to maven installattion's bin directory (<mavenInstallDirectory>/bin) and open your mvn file and add the following line:
export MAVEN_OPTS=-Xmx1024m
This will allow to specify java heap space based on your project needs. You can increase it depending on your case.
After making changes, close all terminals and start a new terminal to execute "mvn clean install"
Detailed documentation can be found here:
https://docs.alfresco.com/5.2/tasks/alfresco-sdk-install-maven-opts.html
You can look at this tutorial to know more on heap and stuff: https://javarevisited.blogspot.com/2011/05/java-heap-space-memory-size-jvm.html
Explore our Alfresco products with the links below. Use labels to filter content by product module.