cancel
Showing results for 
Search instead for 
Did you mean: 

Im having trouble assembling War

cranejimmy3
Champ on-the-rise
Champ on-the-rise

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

1 ACCEPTED ANSWER

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

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

3 REPLIES 3

EddieMay
World-Class Innovator
World-Class Innovator

Hi @cranejimmy3,

Could it be as issue of not enough heap memory?  Have you set MAVEN_OPTS correctly?

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

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}
 
And I'm not familiar with heap memory but this is what's available on my machine.
 
                   total        used        free      shared  buff/cache   available
Mem:         628176      468328       37444       13660      122404       35244
 
 
 
 

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

~Abhinav
(ACSCE, AWS SAA, Azure Admin)