Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mvn failure on build

Tags:

java

maven

I am trying to build one of project using "mvn package" and I am always seeing an error. I installed maven in Ubuntu as "sudo apt-get install maven"

Below is the error I am getting:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single (create-archive) on project : Execution create-archive of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single failed: client id '11012121111423' is too large ( > 4013111 ) -> [Help 1]

What is wrong I am not able to understand at all.

like image 276
john Avatar asked May 14 '15 20:05

john


2 Answers

It is a known problem with the maven assembly plugin configuration.

Since version 2.5 you must specify tarLongFileMode=posix for long file mode support.

Just edit the pom.xml and inside the <configuration> tag add:

<tarLongFileMode>posix</tarLongFileMode>

so the whole tag will be like:

<configuration>
    <tarLongFileMode>posix</tarLongFileMode>
    <descriptor>src/main/assembly/assembly.xml</descriptor>
</configuration>
like image 140
NotGaeL Avatar answered Sep 29 '22 05:09

NotGaeL


In case you don't want to change the pom you can use

mvn clean install -Dassembly.tarLongFileMode=posix
like image 27
Haim Raman Avatar answered Sep 29 '22 06:09

Haim Raman