mvn构建失败

joh*_*ohn 12 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]
Run Code Online (Sandbox Code Playgroud)

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

Not*_*aeL 30

这是maven程序集插件配置的已知问题.

从版本2.5开始,您必须为长文件模式支持指定tarLongFileMode = posix.

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

<tarLongFileMode>posix</tarLongFileMode>
Run Code Online (Sandbox Code Playgroud)

所以整个标签就像:

<configuration>
    <tarLongFileMode>posix</tarLongFileMode>
    <descriptor>src/main/assembly/assembly.xml</descriptor>
</configuration>
Run Code Online (Sandbox Code Playgroud)