mvn构建失败

时间:2015-05-14 20:25:56

标签: java maven

我正在尝试使用"mvn package"构建一个项目,我总是看到一个错误。我在Ubuntu中安装了maven "sudo apt-get install maven"

以下是我得到的错误:

[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]

有什么不对,我根本无法理解。

2 个答案:

答案 0 :(得分:29)

maven程序集插件配置为a known problem

Since version 2.5您必须为长文件模式支持指定tarLongFileMode=posix

只需编辑pom.xml并在<tarLongFileMode>posix</tarLongFileMode> 标记内添加:

<configuration>
    <tarLongFileMode>posix</tarLongFileMode>
    <descriptor>src/main/assembly/assembly.xml</descriptor>
</configuration>

所以整个标签就像:

<svg  width="200" height="200" viewBox="0 0 1000 300"
     xmlns="http://www.w3.org/2000/svg" version="1.1" >
    <rect onmouseover='document.getElementById("desc").style.visibility = "visible"' onmouseout='document.getElementById("desc").style.visibility = "hidden"' x="1" y="1" width="998" height="298" fill="blue" class="showme"/>    
</svg>

<svg width="200" height="200" viewBox="0 0 1000 300"
     xmlns="http://www.w3.org/2000/svg" version="1.1" id="desc" >
  <rect x="1" y="1" width="998" height="298" fill="black" />     
 <text x="250" y="150" font-family="Verdana" font-size="55" fill="white">Hello world!</text>
</svg>

答案 1 :(得分:0)

如果您不想更改pom,可以使用

mvn clean install -Dassembly.tarLongFileMode=posix