【问题标题】:mvn failure on buildmvn 构建失败
【发布时间】:2015-07-26 14:56:43
【问题描述】:

我正在尝试使用"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]

怎么了,我完全无法理解。

【问题讨论】:

    标签: java maven


    【解决方案1】:

    它是a known problem,带有maven程序集插件配置。

    Since version 2.5 你必须指定tarLongFileMode=posix 以获得长文件模式支持。

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

    <tarLongFileMode>posix</tarLongFileMode>
    

    所以整个标签会是这样的:

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

    【讨论】:

    【解决方案2】:

    如果你不想改变你可以使用的 pom

    mvn clean install -Dassembly.tarLongFileMode=posix
    

    【讨论】:

      猜你喜欢
      • 2016-05-17
      • 2012-12-04
      • 2022-09-30
      • 1970-01-01
      • 1970-01-01
      • 2015-07-27
      • 2019-06-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多