Im having trouble assembling War

cancel
Showing results for 
Search instead for 
Did you mean: 
cranejimmy3
Active Member

Im having trouble assembling War

Jump to solution

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 Solution

Accepted Solutions
abhinavmishra14
Advanced

Re: Im having trouble assembling War

Jump to solution

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 solution in original post

3 Replies
EddieMay
Alfresco Employee

Re: Im having trouble assembling War

Jump to solution

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!
cranejimmy3
Active Member

Re: Im having trouble assembling War

Jump to 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
 
 
 
 
abhinavmishra14
Advanced

Re: Im having trouble assembling War

Jump to solution

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)